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

Supporting first-class functions only makes a language "functional" in the smallest sense.

Functional programming goes far beyond that. It encourages things such as immutability, referential transparency, powerful pattern matching, the heavy use of recursion, and robust type systems.

JavaScript either does not support such techniques and concepts, or it makes them difficult to use. Thus it is improper to consider JavaScript a "functional" programming language.

The same goes for JavaScript's so-called support for OO. Prototype-based OO is one of the least-useful approaches to begin with, for real-world software development, and JavaScript even manages to implement it quite badly compared to other languages offering prototype-based OO. JavaScript's complete lack of class-based OO (although, we may see this change with future revisions of the language) further suggests that it's wrong to call it an "object-oriented" language.

I'm not sure we can even make this comparison. JavaScript is, at best, an imperative language that has tried, rather poorly, to partially incorporate concepts from more advanced programming language paradigms. It's hard to imagine Dart, or any other language, supporting more advanced concepts any worse than JavaScript already has.




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

Search: