3 ms·
I don't know Dart but I m intrigued by this "Dart is purely object oriented". Seems that people don't like some fundamental characteristics of javascript: the f
by DomreiRoam 13y ago
I don't know Dart but I m intrigued by this "Dart is purely object oriented". Seems that people don't like some fundamental characteristics of javascript: the functional part and the prototyped based OO style. Is it still possible to use this in Dart or it is like the author said, purely OO?
- PommeDeTerre 13y agoSupporting 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.
- xxgreg 13y ago"Dart is purely object oriented" Languages such as Java and C# have a distinction between objects and primitives such as int and bool. In Dart all types are objects - even null! This is why Dart is pureOO. Dart has some of the classic higher order functions in it's core library - i.e. map, reduce etc. But it's not a functional language like Haskell.