1js, local fundecls, and not-quite-conforming pre-es6 implementations

Claus Reinke claus.reinke at talk21.com
Wed Oct 3 10:37:04 PDT 2012


What was the story wrt subject? 

The Note in ES5.1, 12, Semantics (FunctionDeclarations as Statements) 
used to be unproblematic as this non-portable feature could simply be 
avoided.

It also was unproblematic when ES.next still required opt-in, as old
implementations would then balk before reaching local FunDecls.

But with 1JS, I'm no longer sure what happens when new code that
relies on local FunDecls (and no other ES6 features) encounters an
old implementation. It looks as if there will be no warning or error,
just irreconcilable differences in behaviour?

Is the recommendation that local FunDecls should only be used in
combination with explicit ES6 syntax (to trigger opt-in or explicit
errors)? Should this recommendation appear in the spec (the old 
Note was deleted)?

Claus
http://clausreinke.github.com/ 


More information about the es-discuss mailing list