2011-11-12

When is Javascript going to be updated?

Do you know since when has JavaScript been around? Well if you don't, I'm going to tell you. 1995. That's 16 years ago and since then, it feels like the language has not evolved one bit. Well at least it doesn't feel like it. Having worked with ActionScript allot over the recent years, it makes me yearn for the day that JavaScript takes on some of its characteristics. So here are a few random thoughts on the subject:

  • Why is everything still loosely typed? Why can't I declare the data type of my variable. Once we are allowed to do this, it also means we have greater support for the language in our development tools, meaning less typo mistakes and shorter development times.
  • When will we be able to finally declare a class like any normal person can. You know by using the class keyword. No more of this everything is a function mumbo jumbo. Proper class inheritance would be nice as well.
  • How about having a compiler that can run through our code, to advise us in advance of any syntax errors. Rather than random discovery at run-time of any simple programming errors.


2 comments:

Anonymous said...

As much as I agree on the JS is old garbage debate, there are ways to work with it. Hardly near as good as with AS3, but way more pleasant than Notepad. So - no class or strong typing, but there are IDE's (like php/webStorm i think netbeans too) that kinda understand what's going on in your JS by following what you do. As far I am aware the former also supports phpdoc, so with a little more work you can at least pretend you have strong typing... tho the browser is going to be a final judge on that.

So anyway - it's high time for JS 2.0

Djam said...

This is the reason we see the growing popularity of all the JS frameworks, they actually make it feel like JS is being updated. "Proxy" languages like CoffeeScript and Dart would become a standard, because people realize no matter what they do, their JS code is a mess.