Hacker News new | comments | show | ask | jobs | submit login

>> Harmony modules are made available to legacy JS as module instance objects in the global object.

Does this mean a module is visible like this?

That's kinda what already exists... For that matter, any variation of that (e.g. window.modules.jQuery) can be done with the patterns you mentioned at the beginning of the document.

>> The global object is not in the scope chain of Harmony code

Ah, I see. That's certainly a new feature, but what's a use case for that? I find it hard to justify giving up a few fairly common variable names just for knowing that window.i or whatever is not polluted. It kinda feels like just shifting the name collisions around.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact