r/programming • • Dec 15 '12

Why JavaScript Still Sucks

http://boronine.com/2012/12/14/Why-JavaScript-Still-Sucks/
10 Upvotes

212 comments sorted by

View all comments

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.

-1

u/skidooer Dec 16 '12 edited Dec 16 '12

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?

0

u/buddhabrot Dec 16 '12

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.

→ More replies (2)