2013-06

Video: An overview of ECMAScript 6

[2013-06-20] esnext, dev, javascript, video
On 2013-05-30, I held the talk “An overview of ECMAScript 6” at Fluent Conference, in San Francisco. The video is now publicly available (go there for a larger version of the video). And yes, I was slightly jet-lagged.

with makes it harder to evolve JavaScript

[2013-06-19] dev, javascript, jslang
JavaScript’s with statement has been deprecated for a while [1]: it slows down your code and is forbidden in strict mode. Additionally, it makes it harder to evolve the language, because code that uses it is more brittle.

ECMAScript 6: automatically binding extracted methods

[2013-06-14] esnext, dev, javascript
This blog post demonstrates how to use ECMAScript 6 proxies to automatically bind methods that are extracted from an object.

Freezing instances and the first invoked constructor

[2013-06-08] dev, javascript, jslang
Let’s say you want to write a constructor that produces instances that are frozen (immutable). One problem, you have to solve, is: when do you freeze this? If you always – unconditionally – perform the operation in the constructor then you can’t create sub-constructors that have their own instance properties. This blog post explains how to work around this problem.

Triggering events in vanilla JavaScript

[2013-06-06] dom, dev, javascript, clientjs
So you want to trigger an event for a DOM element, without using jQuery? This blog post gives you a quick recipe for doing so.

The running example is about sending a submit event to a form. I needed to do that for a demo of user interface testing via CasperJS. And, unfortunately, the Form#submit method does not send that event on most web engines.

Running code fast in web browsers: PNaCl versus asm.js

[2013-06-04] asmjs, dev, javascript, pnacl, webdev
The main point of the blog post “Thoughts on asm.js vs PNaCl” (by Gregg Tavares) is:
It just seems like asm.js and PNaCl are closer than people are admitting.
Some of the other points he is making are more controversial, so be sure to read the comments to get the complete picture.

2013-05

JavaScript quirk 8: array-like objects

[2013-05-30] dev, twelvequirks, javascript, jslang

The beginning of infinity in JavaScript

[2013-05-29] numbers, dev, javascript, jslang
Infinity begins relatively early in JavaScript:
    > Math.pow(2, 1024)
    Infinity
    > Math.pow(2, 1023)
    8.98846567431158e+307
What is going on here?

JavaScript quirk 7: inadvertent sharing of variables via closures

[2013-05-23] dev, twelvequirks, javascript, jslang
[This post is part of a series on JavaScript quirks.]

Closures are a powerful JavaScript feature: If a function leaves the place where it was created, it still has access to all variables that existed at that place. This blog post explains how closures work and why one has to be careful w.r.t. inadvertent sharing of variables.

Plans for supporting Web Components in AngularJS and Ember.js

[2013-05-23] emberjs, dev, html5, javascript, webcomponents, angularjs, polymer, webdev
Web Components [1] are an upcoming standard for custom HTML5 user interface elements. Those UI elements will eventually become interchangeable between frameworks. Now the people behind AngularJS and Ember.js have described their plans for supporting Web Components.