Does ECMAScript.next need fixing?
Does ECMAScript.next need fixing?
Who is this guy on stage?
- Marek Stępień — @marcoos
- JS dev since, uhm…, like forever
- Mozilla volunteer since 2002,
(recently as a Mozilla Evangelism Rep)
- Current day job: Grupa Interia.pl
ECMAScript.next, "Harmony", ES6:
- the next version of ECMAScript
- improves on ECMAScript 5.1 Strict Mode
- the base for future JS implementations
- a project of ECMA's TC39 group
- a specification for engine implementors
- discussed in the open at es-discuss
What's in ES6?
- block scope, constants, destructuring,
- default args, rest, spread,
=>
funs,
- syntax sugar: classes,
a <| b
, x.{ prop: val }
,
- generators (
function*
, yield
)
for...of
loops, Maps, WeakMaps, Sets
- ...and more
- I talked about this at FrontRowConf :)
Parts of ES6 are already in your browser
Some people aren't happy:
- feel the language evolves in the wrong direction
- feel TC39 isn't working in the open
- feel their (or "web developers'") ideas aren't heard by TC39
JSFixed
- Anton Kovalyov and Angus Croll launched JSFixed
- GitHub's issue tracker is used to discuss ideas and features, Google Moderator for voting
What made it into JSFixed rec #1?
- 1JS (but with worries about feature detection)
- maximally minimal classes
Object.extend(obj, ...sources)
- (not specific)
Date
fixes
- thin arrow functions:
var square = a -> a * a;
What made it into JSFixed rec #1? (cont'd)
- positional arguments to
RegExp#exec
and RegExp#test
RegExp.escape
- multi-line strings
- existential operator:
if (obj?.child?.foo === "bar")
What made it into JSFixed rec #1? (cont'd)
Object.forEach
- Additional
Math
functions (mod
, sinh
, asinh
, deg
)
fileName
, lineNumber
and column
in thrown Error
s
Does TC39 care?
- discussion at es-discuss started
- some JSFixed ideas are roughly the same as TC39's
- others are unlikely (
->
)
- at least, TC39 now knows more about what the community wants
Current common ground (kind of)
JSFixed | TC39 |
1JS | 1JS |
Object.forEach | for...of |
max/min classes | some form of max/min classes |
Math.* | even more Math.* |
multi-line strings | quasi-literals |
JSFixed: What's next?
- discussion at es-discuss continues
- another iteration possible. If it is...
I want you to vote,
add new proposals, or both!