On Tue 20 Mar 2012 16:45, Andy Wingo <wi...@igalia.com> writes: > Unifying the specifications of let and const in the latest draft means > that now, const statements can have no initializer. Is that intended?
Of course, after sending this mail, I find: Static Semantics: Early Errors LexicalBinding : BindingIdentifier It is a Syntax Error if the BindingIdentifier if IsConstantDeclaration of the LexicalDeclaration containing this production is true. Some of the const strangeness is still there though. It's not necessarily the case that the value of the const is either nothing (in which case you get a TDZ error) or the result of the initializer -- anything else that executes before the const could set it. So a revised ignorant suggestion on my part: > disallow assignment to const variables outside an initializer Regards, Andy -- http://wingolog.org/ _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss