simple modules

Vassily Gavrilyak gavrilyak at gmail.com
Mon Feb 1 03:18:09 PST 2010


Small feedback from users.

This example does not look right.
<script type="harmony">
// import everything
import "Math";
alert("2π = " + sum(pi, pi));
</script>

It should be

<script type="harmony">
// import everything as Math
import "Math";

alert("2π = " + Math.sum(Math.pi, Math.pi));
</script>


We already have "with" for polluting local namespace,
and short syntax for such polluting doesn't feel right.
Some longer syntax would be better, e.g.

<script type="harmony">
// import everything
import "Math" as this;

alert("2π = " + sum(pi, pi));
</script>

Otherwise the proposal looks good for me.


Regards,
Vassily
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20100201/dcfec311/attachment.html>


More information about the es-discuss mailing list