On Nov 4, 2010, at 10:20 AM, Kris Zyp wrote:
> the entire design space. If that is incompatible, so be it. But if the
> current proposal can desugar and provide a smooth transition, why
> shouldn't it? So far I am not seeing the essential incompatibility.
I repeated these points in AMWB, to what I was afraid was an excessive degree.
I guess it wasn't :-/.
There is no way to "desugar" a require("foo") into a prefetch of that URI
before the script in which the require call occurs has loaded and is being
evaluated.
There is no way to remove the global object from the scope chain in ES5.
It is currently difficult to control visibility of outer names as viewed by an
externally-loaded module body.
Arbitrarily complicated compilation or preprocessing is not "desugaring".
I don't see why you came out swinging hard, with lots of words, against Harmony
modules, if you now agree with Alex.
In Harmony, we are not mainly codifying what can be done in the language
already using first-class objects and functions. Some de-jure codification of
de-facto standards will happen, as with JSON, array extras, etc. in ES5. But
that is not the focus and we do not want to overdo it before de-facto standards
are ripe.
In Harmony, we are aiming to fill semantic gaps that cannot be filled by
in-language means, as well as improve syntax all around. This definitely
applies to the module system.
Objecting to this with loaded language about "being blind", while making an
idol of ill-defined and (when taken too far) unsuitable "desugaring", is not
helpful. It misses the purpose of evolving the language beyond adding syntactic
conveniences.
Yes, we want to keep kernel semantics as simple as possible and (truly,
locally) desugar where possible. No, that principle does not circumscribe our
efforts to fill real gaps in the language.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss