Hi,
Something caught my attention while reading through the
Strong Mode Proposal, regarding the creation of object properties.
As we know, a common way to avoid naming conflicts in JavaScript is to create object literals (treating them as namespaces) and populate them with functions and constructors, the
Closure Library is a good example of this. Based on what I have read in the proposal, this is going to become quite cumbersome when using strong mode. It seems we will have to (a) define all object properties ahead of time in one lumpy declaration, or (b) use the verbose
Object.defineProperty function everywhere.
There is also the issue of "static" properties and functions that are typically defined like FooClass.APPLE=1 ... FooClass.BANANA=2 etc on constructors (or classes in ES6).
Does any have any thoughts regarding this?