Object ID's
Brendan Eich
brendan at mozilla.org
Wed Mar 21 22:34:34 PDT 2007
On Mar 21, 2007, at 7:27 AM, Igor Bukanov wrote:
> On 21/03/07, Brendan Eich <brendan at mozilla.org> wrote:
>> Catchalls therefore look tempting for building value -
>>> value maps,
>
> It looks like the proposal misses function intrinsic::delete(ident)
Why is this needed? There's no delete hook that can be overridden, so
the delete operator (not a function or method) can be used on any
property, either named by lexical reference, or by obj.prop or obj
[computed_name] or more complicated forms involving ::.
> and perhaps intrinsic::has(ident). The latter is necessary to allow to
> use objects with catchalls under with() {}.
You're right that without has (not the intrinsic::has that would be
the override-able built-in -- but why do we need that given the in
operator?) one cannot make with (obj) foo work when obj = {get *(id)
{ if (id === "foo") return 42; return undefined }}. The parallel
construct would be obj = {has *(id) {...}}. Is this really necessary
just for with and with-like constructs (E4X's o.(e) filtering
predicate)?
/be
More information about the Es4-discuss
mailing list