strawman for the := operator

Axel Rauschmayer axel at
Wed Aug 8 21:36:55 PDT 2012

> I still find the difference between assigning and defining very subtle. I am still trying to fully wrap my head around it.
> The best way to think about it is to think of how innerHTML works. If you "define" a property called "innerHTML", it would pave over the existing innerHTML and all of the semantics would be lost. When you "assign" to elem.innerHTML, the accessor semantics handle updating the DOM with the value given as the AssignmentExpression on RHS.
> Hopefully that helps?

Thanks. With properties, we are missing the clarity that we have with variables: You can’t assign to an undeclared variable (in strict mode). With properties, assignment “auto-declares” if there is no own property and no setter. So things are less clear.

Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list