Some thoughts on JavaScript 2.0

I've been using JavaScript before quite a lot when creating websites and flash games and whatnot, but usually these were just simple, short scripts, and most of the time they even were so small that they were embedded directly into the HTML.

But recently, I had to dig a little bit deeper and came across the real beauty of JavaScript and realized some of its big features: Only doubles as primitive types, no ints, no floats, no bytes or similar. No classes, no real types, no OOP, but of course, you can build your own ugly class/inheritage system using prototypes and functions. If it is true, and the future really is web apps, then I pity the future software developers who have to write software based on this language.

But at least, there is light at the end of the tunnel, the next version of JavaScript, ECMAScript 4 / Harmony or better known as JavaScript 2.0, featuring classes and static typing. I hope this language will be finished and implemented soon, because this would mean the real fun with client side web apps can finally begin.

six comments, already:

Lua is like that and nobody seems to mind; of course, the question is, why does anybody need another Lua. :)
Arseny Kapoulkine () (link) - 29 09 09 - 19:42

Yes, there’s so few primitive types in Javascript. It’s hard to do some simple things in this language. A pity you have to use it in web programming.
Hervé () (link) - 30 09 09 - 01:02

@Arseny: roflmao, so true..

@post: totally agree with you,javascript seriously needs some reworks, it was one of the first languages i worked on and when i did some work on it again after going through c++ it seemed a total mess..
Rapchik () - 30 09 09 - 02:55

http://code.google.com/webtoolkit/
http://pyjs.org/
hroace () - 30 09 09 - 02:58

Once JavaScript 2.0 is released, most of the companies that do webdesign/programming won’t use it. Reason? MS InternetExplorer will most likely not support it.

Based on my own experiences JavaScript is a nice language for writing little scripts that add some eye candy, drag’n’drop functionality and small custom widgets (preferably using a framework like jQuery/jQuery UI) to a site. If you try to write a bigger web application, scripts quickly turns into a single mess which is very hard to maintain, though.

To be honest, I think Flash and Silverlight (for those companies that go the “all we use is MS” way) are far better choices for web apps.
Whatever - 30 09 09 - 08:26

@whatever: Exactly what I mean. But I think this will change once JavaScript 2 is implemented and supported by all major browsers.
niko - 30 09 09 - 10:21


Name:  
Remember personal info?
yes
no
Email (optional):
URL (optional):
Enter "layered" (antispam):
Comment:Emoticons / Textile

  ( Register your username / Log in )

Notify: Yes, send me email when someone replies.  

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Note: If you type in your email adress above, it will be visible to other visitors, although it will be hidden for bots using javaScript.