Recently Claus Reinke proposed some alternative that I think feels is so much more natural and simpler than <| or beget:
..
.. re-interpretation deleted ..

Ahem;-) Glad to see my proposal noticed, but what I really
suggested, in

   motivating <| as structure representation, not operator
   https://mail.mozilla.org/pipermail/es-discuss/2011-November/018626.html

was to interpret

   proto <| {..}

as a source representation of the unwritable

   { [[prototype]]: proto , .. }

Two problems:

1. Does not work for array, function, and regexp literal right-hand sides.

With my original suggestion, could work for array, and regexpr,
and function. The difference from the original <| was just that I
wanted to interpret <| directly as structure representation, not
as an operator taking a full object rhs.

Though I suggested to eliminate the special case for function,
and to set only [[prototype]], not 'prototype' as well.

We should be explicit about setting function's [[prototype]] or
setting function's 'prototype' (the [[prototype]] for new objects).

2. Preempts a property name. We cannot preempt 'prototype',
and '__proto__' was already tried (it sucks due to preemption
combined with magic meta-programming power in what looks
like just another property).

Not an issue with my original suggestion, as the name is implicit.

Claus
http://clausreinke.github.com/


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to