Hacker News new | past | comments | ask | show | jobs | submit login

actually, no. As I understand it, the language was supposed to be some sort of weird conglomeration between traditional object oriented languages and dynamic, lisp-ish languages. The problem was that the creators had about 30 seconds to get this done and they could make things look more "normal" by not explicitly supporting every feature they envisioned.

"new", I believe, is actually an ancient relic of the prototypal class system. That's another topic entirely, but it's incredibly cool. Check out Douglas Crockford's articles on inheritance if you want closure on the issue. He has written way more than I have on the topic.




"new", I believe, is actually an ancient relic of the prototypal class system.

I believe it is quite the opposite. It was a failed attempt to make the prototype-based object system look like class-based one. I vaguely remember reading this opinion in Crockford's "Javascript:The Good Parts" book.


Agreed. That's actually what I was trying to say. It's an ancient relic of JavaScript's implementation of the class system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: