motivating <| as structure representation, not operator

Quildreen Motta quildreen at
Sat Nov 19 08:03:12 PST 2011

On 19/11/11 13:42, Axel Rauschmayer wrote:
>> (I'm thinking about blog posts here, which typically face the dilemma 
>> of talking about [[prototype]] vs 'prototype', to help
>> readers in the long run while confusing them at first, or talking 
>> about __proto__, to be understood in the short run, with possible 
>> problems later).
> Where human language usually fails me is when I initially explain 
> prototypes in the __proto__ (or Object.create() or Self-ish) manner 
> and then get to constructors. Then I talk about the constructor’s 
> prototype to avoid the longish “the value of the prototype property of 
> the constructor”. But that’s confusing! It’ll get worse should 
> constructors become prototypes of each other in the future.
Constructors are really the only confusing thing in JavaScript's 
implementation. The way I usually explain it is by first talking about
`[[Prototype]]' and the under-the-hood semantics using objects alone,
then explaining how constructors mess all that up :3

The special-casing of `new' has been my "favourite" topic so far.

That said, I find it interesting to think about <| in terms of structural
notation rather than yet another complex layer on top of constructors.
In fact, I'd rather give up on constructors entirely, but I don't think
that's an option now =/

More information about the es-discuss mailing list