Re:CoffeeScript: The beautiful way to write JavaScript
by munificent on Tuesday March 08, 2011 @05:12PM
(#2302802)
> let go an embrace the prototypal object model
JavaScript itself doesn't embrace a prototypal model. When was the last time you cloned an object to create a new one in JS?
JavaScript's model is much closer to classes than prototypes. The only real significant difference is that unlike class systems, JavaScript allows inheriting both "methods" and "state" from its "class". Otherwise, the language works more or less like a class-based one.
JavaScript itself doesn't embrace a prototypal model. When was the last time you cloned an object to create a new one in JS?
JavaScript's model is much closer to classes than prototypes. The only real significant difference is that unlike class systems, JavaScript allows inheriting both "methods" and "state" from its "class". Otherwise, the language works more or less like a class-based one.