raynos2 at gmail.com
Sat Sep 24 14:37:56 PDT 2011
On Sat, Sep 24, 2011 at 5:03 PM, David Bruant <david.bruant at labri.fr> wrote:
- Show quoted text -
I defiantly like this `<|` operator. I would happily have this instead.
> I'm a big fan of the proto operator proposal, however, as raised
> previously this operator relies on the object being created to have an
> intialisation syntax. This prevents, for instance, Date objects to have
> a custom prototype with this method. I am not very familiar with it yet,
> but I think that if they ever came to life, ParallelArrays  would
> suffer from the same problem.
> By the way, could someone add this concern as a note ("open issue" or
> "limitation" or something like this) in the proto operator page, please?
I don't understand the limitation for `Date`.
var d = proto <| new Date();
That would appear to just work for me. Of course it would be sensible that
proto has Date.prototype somewhere in the chain
> One even more generic way which would work even for objects that have no
> initialization syntax would to standardize one of  or . Is there a
> wiki page mentionning these two functions somewhere? If not, may it be
> added and linked in some way to the proto operator?
Personally I would be tempted to say that making mutating the prototype
chain of an object after creating leads to black magic and abuse.
>  http://wiki.ecmascript.org/doku.php?id=harmony:proto_operator
>  https://mail.mozilla.org/pipermail/es-discuss/2011-March/013141.html
>  https://mail.mozilla.org/pipermail/es-discuss/2011-March/013154.html
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss