Re:Understanding "Prototypes" in JavaScript
by Cushman on Sunday August 14, 2011 @09:21PM
(#2885040)
Yeah, I can understand how it makes implementors' lives easier... I just like it when they deal with annoying stuff so that I don't have to :)
I know people don't use mutable __proto__ for anything useful, but it does enable some neat tricks. Personally I wish implementors would embrace it and optimize for it rather than trying to make it go away.
As for the "prototype for" operator... that's disgusting.
More knowledgable people than myself discuss it on this es-discuss thread: http://www.mail-archive.com/[email protected]/msg06142....
There is a Harmony proposal for a "set prototype of operator" that would solve this problem; instead of writing:
You would write: Detailed here: http://wiki.ecmascript.org/doku.php?id=harmony:proto_operato...