Do Anonymous Exports Solve the Backwards Compatibility Problem?

David Herman dherman at mozilla.com
Wed Dec 19 15:22:46 PST 2012


On Dec 19, 2012, at 12:05 PM, Andreas Rossberg <rossberg at google.com> wrote:

>> Assigning a single exports also nudges people to make small modules
>> that do one thing.
> It rather nudges people into exporting an object as a module, instead of writing a real module. The only "benefit" of that is that they lose all static checking.

I don't think that's fair. It's just an anonymous export. The contents of an export are always dynamic.

All this "nudge" stuff makes me itch, though. I have about ε sympathy for enforcing/encouraging aesthetics and styles. That ain't JavaScript's way, and I sure don't trust TC39 (i.e., me) to take on a paternalistic role.

Dave



More information about the es-discuss mailing list