Ariya Hidayat, creator of PhantomJS and Esprima, writes about JavaScript engines, web performance, API design, and developer tooling.
HN links it mostly for his 'boolean trap' API design post, plus pieces on ES6 syntax, V8 TurboFan, and Nix on OS X.
Thank you!
TLDR: JSX transformer makes the following ES6 features compatible with old browsers (IE8+)
* arrow functions [http://tc39wiki.calculist.org/es6/arrow-functions/]
* classes [https://github.com/esnext/es6-class]
* destructuring [http://fitzgeraldnick.com/weblog/50/]
* object concise methods [http://ariya.ofilabs.com/2013/03/es6-and-method-definitions.html]
* rest parameters [http://tc39wiki.calculist.org/es6/rest-parameters/]
* template strings [http://tc39wiki.calculist.org/es6/template-strings/]
* object literal property shorthand [http://tc39wiki.calculist.org/es6/object-literal-enhancements/]
Notably absent: default parameter values and block scoping ("let")
I thought you were being facetious! In case anyone else also thought that, turbofan is a real thing: " [1]
> Recently, Google engineers landed a new optimizing JavaScript compiler for V8, codenamed TurboFan. As the name implies, this is supposed to further improve JavaScript execution speed, likely to be better than its predecessor, Crankshaft. While TurboFan is still in its early stage, that doesn’t mean we can’t take a look at it.
I imagine that it has to get stable for v8 first before it is even considered, but that's exactly the example of potential "more performance" in io.js
[1] http://ariya.ofilabs.com/2014/08/javascript-and-v8-turbofan.html
Absolutely they do. That's the major benefit of object orientation: named properties and methods.
Otherwise, we fall into exactly the "boolean trap" that the author links away to. [1]
[1] http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html
That's not the only thing you have to trust.
http://ariya.ofilabs.com/2016/05/nix-as-os-x-package-manager.html is served over HTTP. Saying "Copy and paste this `curl | sh` command" allows this attack: http://thejh.net/misc/website-terminal-copy-paste
I think they're both using Nitro (depending on who you ask: http://ariya.ofilabs.com/2012/06/nitro-javascriptcore-and-jit.html), but UIWebViews don't have JIT compilation turned on (no executable memory pages allowed in iOS apps), so they're slower.
It's ES6 shorthand literal syntax [1], equivalent to:
module.exports = { route: route, routes: routes };
[1] http://ariya.ofilabs.com/2013/02/es6-and-object-literal-property-value-shorthand.html