Why Javascript?

So, I was reading an interesting article today by a javascript developer on why JS is unsuited for server side development. That’s right Node.js, we’re talking to you. He brings up a plethora of good points, and many that I was unaware of, plus the bonus links to wtfsjs, but I think he missed an important one. So, can someone please explain to me how a language where everything is an object (strings, functions, arrays, numbers!) can so utterly fail to be object-oriented? I’m not even talking about interfaces and abstract classes and all the fancy java-y stuff, all I want to use is inheritance! I realize functional programming is the cool new thing, but that didn’t stop python from having a robust class model.

You know, as much as I hate to admit it, some of the criticism that is being leveraged against javascript was once used against PHP:

  • Poor/missing OO support (PHP < 5)
  • Lack of namespaces (PHP < 5.3)
  • Eval (still here)
  • Equality fail (== vs ===, still here)
  • Bitwise operators that work on doubles (still here)
  • Type wrappers and type conversions (still here)

I’ve heard all of these complaints, and yes, some of them are unfortunate: So why does javascript  get off easier? Their complaint list is actually longer!

We should expect more from our languages and not settle for what we feel stuck with. Unfortunately, JS is one of the few tools for it’s job on the web, but the answer isn’t sharing the pain server-side. The answer is finding better solutions client side. Now please, hop off this Node.js bandwagon and use one of the “many better (and faster) alternatives”.

Update: You should also check out this short video. It’s funny because it’s true.
Update: And for all you Node people

About Bion

I'm a software developer at Modo Payments, a mobile payment provider. When I'm not hacking away the office, you I'm usually at home hacking on something else. Or practicing Aikido. Anyway, I just post things here that Google couldn't help me with, so maybe it'll help you in the future. Since you're reading this, I guess it worked :)
This entry was posted in Technology and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *