On Tue, Sep 27, 2011 at 2:01 PM, Jarek Foksa <[email protected]> wrote:
> After some searching on the web, I stubled upon this message by
> Brendan Eich: 
> https://mail.mozilla.org/pipermail/es-discuss/2011-February/012893.html
>
> Why does he want to remove __proto__ from Spidermonkey? I would rather
> expect an effort to standarize this useful property. Is there any
> standard replacement for it already? Are there any plans for standard
> replacement for it?

Possibly because no specialised initial state can be encapsulated in a
closure if you use the __proto__ property, or maybe it would add yet
another way of doing object inheritance.  I agree though; I think it
is much closer to how I would have liked JS to have been written.  The
'new' keyword and Function.prototype property are clunky, to say the
least.

When I inherit, I often use something like Object.extend in your other
reply, or Crockford's Object.create.  I don't have a problem with
worker functions operating on objects with the call or apply methods
either.  I never understand these "patterns" that eschew prototypical
extension for something class-based.  It seems weird to write a load
of complex code just to cripple your inheritance model.  It's the only
thing that really puts me off using CoffeeScript.  Hopefully the cs
author is reading this and will immediately rewrite that part of the
language just to make me happy. :)

David M

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to