On Sun, Oct 30, 2011 at 3:35 AM, Axel Rauschmayer <a...@rauschma.de> wrote: > I guess > > every JS dev is puzzled by .prototype already. > > Compared to a class > > language, it seems like a hack. Do we really need it? > > I can't tell if this is sarcasm... Ive long held that prototypes are the > next evolutionary step up from classes - developers need to evolve now as > well. Perhaps I've misunderstood your meaning? > > I agree with the prototype property of functions being a bit odd.
".prototype" (dot prototype) confuses developers. It's way beyond odd. > I don’t > agree with prototypes being difficult to understand, I find them very > elegant (but that doesn’t seem to be what he is saying). I certainly don’t > agree that class(-based) languages are easier to understand. It’s the > opposite: Always having to create a class to create an object is opposed to > how humans think: You don’t start with the abstract, you start with the > specific. Self has demonstrated very well that prototype-based inheritance > can be very intuitive. In the abstract I would agree, but, in our world, every college sophomore CS student learns a class based language and, in our world, prototypical inheritance in JS uses a bizarre pattern of expression. ES should work make this bizarre pattern unnecessary so prototypical inheritance can shine. Using ".prototype" in new patterns heads in the wrong direction: that is the comment I was making on Allen's proposal. jjb _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss