About this Directory
The harmony namespace is intended to contain approved proposals for the ES-Harmony language.
The following requirements, goals, and means help to inform and guide development of proposed extensions and improvements to ES5 for ES-Harmony.
Straw-man proposals live in strawman until approved by TC39, at which point they move into the harmony namespace, linked from the proposals page.
Working drafts of the specification for the next edition of ECMAScript that incorporates Harmony proposals is on the Specification Drafts page.
— Brendan Eich 2009/07/29 23:42
Requirements
New features require concrete demonstrations.
Keep the language pleasant for casual developers.
Preserve the “start small and iteratively prototype” nature of the language.
Goals
Be a better language for writing:
complex applications;
libraries (possibly including the
DOM) shared by those applications;
code generators targeting the new edition.
Switch to a testable specification, ideally a definitional interpreter hosted mostly in ES5.
Improve interoperation, adopting de facto standards where possible.
Keep versioning as simple and linear as possible.
Support a statically verifiable, object-capability secure subset.
Means
Minimize the additional semantic state needed beyond ES5.
Provide syntactic conveniences for:
good abstraction patterns;
high integrity patterns;
defined by desugaring into kernel semantics.
Remove (via opt-in versioning or pragmas) confusing or troublesome constructs.
Harmony builds on ES5 strict mode to avoid too many modes.
Support virtualizability, allowing for host object emulation.
Themes
Modularity, or how to delineate units of source code to hide the insides from outside users
Isolation, to prevent effects from propagating, or allow them only through certain references
Zero-authority maker-style modules
Other combinations of primordials/contexts/builtins with modules
Lack of isolation in browsers: multiple connected global objects
Virtualization, for stratified guest code hosting, bridging disjoint object systems, and in particular emulating host objects
Control Effects, for simpler iteration and state-machine code
Delimited continuations
Generators, iterators
Library/Tool Enabling, so the TC39 committee is not blocking library evolution
Language Reform, the “better carrots” needed to lead users away from bad forms
let, const, function in block scope
Default and rest parameters, the spread operator
Destructuring
Versioning, since new syntax is part of Harmony.