Direct proxies update

David Bruant bruant.d at
Thu Nov 24 07:37:14 PST 2011

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
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.

>> We should probably consider using the names 'deleteProperty' and 'construct'
>> instead.
So this sounds like a good idea to work around the issue.

>> If that's really the case, I would prefer changing identifiers that can be
>> imported/exported from modules rather than changing names of the Reflect
>> API.
> It's really not about modules -- these names are reserved, and can't
> be made into bindings.
"import Reflect from "@reflect""
would work, though, right? The difference is interesting.


More information about the es-discuss mailing list