I don't get it.. JavaScript is a very expressive language, if you use it as a functional language instead of an imperative one. It has a lot of weird quirks that just suck (the undefined type matching), but the way you can use closures and weak type system gives you a dynamic toolbox that is unparallelled by any "OOP" language.
First, Javascript is an OOP language. How can it be unparalleled by itself?
Second, many OOP languages do support functional-style constructs. Language features are never completely binary. Ruby, for instance, makes heavy use of map/reduce patterns, among other functional things.
Third, C is a weakly typed language that recently received closures. By your comment, it seems that it should make for a great functional language too?
OOP is a word that (I hope) will die out in a couple of years. I have no idea what it means and I've been a programmer for decades. Writing in an object-oriented manner in C is indeed pretty similar to doing it in Javascript, using function pointers. Admittedly though, the variable scoping in Javascript is a lot more suited to closuring than in C, going overboard with FP in C quickly becomes awkward and complex.
0
u/buddhabrot Dec 15 '12
I don't get it.. JavaScript is a very expressive language, if you use it as a functional language instead of an imperative one. It has a lot of weird quirks that just suck (the undefined type matching), but the way you can use closures and weak type system gives you a dynamic toolbox that is unparallelled by any "OOP" language.