Direct proxies update

Sam Tobin-Hochstadt samth at
Thu Nov 24 08:04:50 PST 2011

On Thu, Nov 24, 2011 at 10:37 AM, David Bruant <bruant.d at> wrote:
> Le 24/11/2011 16:04, Sam Tobin-Hochstadt a écrit :
>> On Thu, Nov 24, 2011 at 9:45 AM, David Bruant <bruant.d at> wrote:
>>> - Definition of a standard "@reflect"
>>> module: <>
>>> One observation I made while working on this module is that it's probably a
>>> bad idea to use keywords as trap names (delete, new), since such names
>>> cannot be straightforwardly imported/exported from modules.
>>> How so?
>> You can't do the following:
>> import {new, delete} from "@reflect";
>> because you can't bind `new' and `delete'.  Even if this were allowed,
>> then `new(...)' would still be a syntax error.
> Oh ok... It actually is more an issue of destructuring than modules
> themselves.
> Interestingly, it means that as soon as we have the module syntax out
> there, there will be pretty much no way to add a new reserved keyword
> (ever?), because someone may be using the identifier and adding the
> reserved keyword would break the module import.

This is already the case in ES5 -- someone might be using `module' as
a variable name, as in:

var module = 7;

and thus making `module' a reserved word would break this code.  We're
dealing with this for by a combination of an opt-in and
contextual reserved words.
sam th
samth at

More information about the es-discuss mailing list