Summary: prototypes as classes

Bill Frantz frantz at
Wed Jun 29 19:44:07 PDT 2011

On 6/30/11 at 17:46, rfobic at (Irakli Gozalishvili) wrote:

>I think that whole constructors as classes business in JS is 
>confusing for everyone coming to JS, and they only understand 
>it after understanding confusing constructor- prototype relationship.

I don't know about others, but I need to have a mental model of 
what is going on in order to feel comfortable using a 
language/API/library. I didn't really feel comfortable with the 
ADD instruction until I understood how addition was implemented 
at the circuit level. I didn't feel comfortable with C++ classes 
until I understood the basic layout of an instance. I think is a 
matter of believing I can avoid stepping on any landmines that 
may be lying about.

I have a prejudice that the model should match the reality, but 
I accept that an optimizer may do something completely different 
if it still implements the model.

Simple is nice, but accurate is more important.

Cheers - Bill

Bill Frantz        | The first thing you need when  | Periwinkle
(408)356-8506      | using a perimeter defense is a | 16345 
Englewood Ave | perimeter.                     | Los Gatos, 
CA 95032

More information about the es-discuss mailing list