a future caller alternative ?

David Bruant bruant.d at gmail.com
Tue Mar 12 01:31:51 PDT 2013


Le 11/03/2013 22:51, Andrea Giammarchi a écrit :
> the outer `with` statement ... you see my point? we are dropping 
> powerful features in order to make JavaScript the toy we all think is 
> since ever
A while ago I discussed the 'with' trick on es-discuss (I don't remember 
when, it was a message about dynamic loaders IIRC) and I think Mark's 
reply was that it was a "temporary" (ES5 era) hack and the proper ES6 
way would be to use a custom loader (using the a custom 'global' property).
In that instance, "with" isn't a powerful feature, it's a convenience 
used so that the relevant sandboxing code is 6 lines instead of a full 
parser, because if there was no "with", that's probably what Caja would 
be doing anyway.

David


More information about the es-discuss mailing list