About classes -- JavaScript does not need them (was Re: [amber-lang] Re: Parser improvements)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

About classes -- JavaScript does not need them (was Re: [amber-lang] Re: Parser improvements)

Hannes Hirzel
On 1/26/12, JG <[hidden email]> wrote:

> Well I agree with you on the behavior of human mind, however, to model this
> nature, a system that supports classes when needed, (for example one object
> may be classified to different classes but the object never gets broken in
> real world), but not class dominated would be fit to the nature a bit
> better. And prototypes could be thought as genes.
>
> The class oriented world can be broken easy, there's no reason for living
> things all of a sudden to change behavior just because some was delighted
> and changed the definition of their classes. Since classes
> are conceptual beings not realistic ones and objects live their own lives
> they way we can classify later from different view point bases. Wrong
> classification will not do harm to objects. Sadly in programming this is
> not that case when object are plotted by classes.
>
> And in a language is object generated it could be easy to add class support
> treating a class just as an object as normal, though, a class dominated
> language will have to make some efforts to pretend that they can do without
> making classes first to bring things to live. And objects have no
> individual rights.
>
>


An interesting article
http://www.i-programmer.info/programming/javascript/3354-javascript-doesnt-need-class.html

From the intro:
"JavaScript is the single most important programming language and yet,
as it reaches its high point, everyone is complaining about it and
there are significant efforts to replace it with something better -
Go, Dart, Coffeescript. Even the people who love it seem to
misunderstand it because they want to add "class". JavaScript doesn't
need class! And if you think it does you need to look more carefully
at JavaScript."

BTW:  As JavaScript does not support classes out of the box using
delegation comes in naturally. (cf the thread 'subclassing arrays').

HJH