Sweet! Another Javascript!?!

Scoble, the famous self-promoter who many people love-to-hate, did a short post tonight on “ECMAScript“, something of a mashup between C++ and Java that aims to replace (read: fix) Javascript. Is this good (everyone knows Javascript was poorly thought out)? Is this bad (aren’t browsers bad enough as it is)?

The Good

Let’s start with the positives. First, everyone (and I do mean everyone) that has used Javascript knows the following:

  • not well thought out
  • very hard to develop with
  • supported and interpreted different ways (because of the DOM) by different browsers

Given those items, the simple fact that ECMAScript has much better syntax and higher level functionality gives it a major leg up on the competition. A language that is based on both C++ and Java, one would assume, has many more development and debugging tools than Javascript/AJAX currently does. What do you use now? Firebug? And that’s it? Oh right, that’s all there is.

You Will Fail
Just like the entire .NET Platform.

If you actually look at some of the specs, you should be impressed. I would love to have structure, syntax, and functionality comparable with compiled/server-side/”normal” languages like C/C++, PHP, and Java. True DOM OOP? Oh how you tease me…

The Bad

Take a look at any website that isn’t built entirely in flash. Chances are that it involves at least one “hack”… something to make the fancy menu work? Or perhaps some dynamic data flow courtesy of AJAX? Or one of those little-known projects like Google Maps that work so fluidly? Let’s look at some info on the three “main” browsers (and pretend Opera doesn’t exist):

  • Internet Explorer is a total failure, and is currently trying to play “catch up” with the rest of the browser world. This is not news.
  • Mozilla/Firefox has become the poster child for attempting to closely follow the W3 recommendations, and receives praise daily from almost anyone who works with computers.
  • Safari has been known to be better than IE, but worse than Firefox. However, with the new/forthcoming release, many of the problems in rendering items, as well as it’s idiosyncrasies, are fixed or improved. There’s even rumors of it being based on the ‘Gecko’ engine…

Browser Wars
Gates = Sith = Evil. Get it?

My point? The three most widely used browsers are all terribly different. They can’t agree on how to render certain HTML/XHTML and CSS elements… let alone how to handle Javascript and the DOM. What happens when you try and implement a language that is meant to do more while replacing Javascript?

The Ugly

If you’ve been paying attention the last year or two, then you’re aware that very few (if any?) AJAX applications are custom coded from the ground up. More often than not, they use a library like Prototype or jQuery. Even Google doesn’t… they developed a “translator” that moves Java to Javascript, allowing you to code in Java and then implement it as Javascript/AJAX: it’s called the Google Web Toolkit.

Think about all those applications, pages, sites, and “business models” based around using Javascript and a certain library. Think about how long it took them to figure out how to do what they wanted… and then guess at the cost. Once you’ve wrapped your brain around that, think about how long and costly it would be to switch languages.

That would be the web equivalent of recoding your entire program in C++ when it was written in FORTRAN… it would really be that different.

Understand Me
Pretty much the same thing here.

My Stance

Believe it or not, I don’t have one. I’m divided. I really would like to have everything I described as being a benefit of a “real” language to replace Javascript, but I think the outcome of attempting this would be truly disastrous.

Maybe the answer is not to build another language that sits on the browser for DOM usage… why not build that functionality into server-side languages like PHP or Ruby? I realize that sounds impossible, but what if there was a way for the script to recompile itself (or portions of itself) as necessary? Tie in connections to the browser itself, and doesn’t that meet all the requirements without all the hassle?






Viewing 3 Comments

blog comments powered by Disqus
Ads
<< PreviousNext >>