Thursday, June 08, 2006

JavaScript: Why it's wrong.

JavaScript is the VB of the 21st century.

Don't let the title fool you. I think JavaScript is a really, really cool language. It uses Java's syntax, but the similarites end there: No class path, no modules, no using, no...

It's so much more powerful than many people think: Interesting object model, prototypes, full featured, etc. And when you team it up with the DHTML model in a browser, you can do great things. It's remarkably portable across browsers -- most of the incompatibility comes from the DHTML differences.

But it's wrong for web development:
1) In the same way that C++ is too low-level. Too easy to hang yourself. Here is a screwdriver -- make a house.
2) Debugging hell. Becomes painful to debug.
3) Interpreters are not for the timid.
4) In Ajax, requires too much knowledge: DHTML, java, XML, whatever you're using on the server side.
5) Too hard to reuse.
6) Spaghetti code.

No comments: