xiphias: (Default)
xiphias ([personal profile] xiphias) wrote2012-02-07 07:59 pm

The more I use JavaScript, the more annoyed at it I get.

I mean, it's not DIFFICULT to use or anything, but it's so awkward. It's . . . inelegant. Things that should be analogous use different syntax, for no apparent reason. The equality operator is "===".

It's like it was designed by independent people at different times who weren't in consultation with each other, and then bodged together at the last minute. I swear, the thing looks like it was designed by, I dunno, MBAs or something. Or maybe planaria. Or maybe even flatworms with MBAs.

[identity profile] alienne.livejournal.com 2012-03-04 12:49 am (UTC)(link)
Well, I've never managed to grok LISP, myself, actually. But i do love JS, and love it more the more i do with it. I do think reading Crockford is probably hugely helpful -- at least some of the stuff on his site, if you can't find/afford/deal with the book.

(And there are actually two equality operators in JS, btw: you can use '==', but it does type coercion, as someone else mentioned. The reason to use '===' is that it doesn't coerce types, so it's a lot safer.)

You're also not WRONG about it being a language designed by committee, mind. There's some really STUPID shit in JS, precisely because of that. But it is also true that on its own merits, it has a lot of really marvelous stuff. I am in particular deeply in love with prototypal inheritance, because it makes SENSE to me in a way that "classical" inheritance never really has.