Back around 1995 or 1996, Netscape intruduced a weird and fun little language called JavaScript, which they called "LiveScript" until their marketing people decided to hitch their wagon to Sun's massive marketing push for their Java language (there's not much connection between the two beyond that). Netscape's web browser let you embed JavaScript code in a web page and do some neat things with it.

Microsoft had to follow suit, but Microsoft is Microsoft, so they decided to invent "VBScript" instead. "VBScript" is a chopped-down version of MS's Visual Basic language, a language which many programmers do not enjoy using (speaking tactfully). So Microsoft's web browser, "Internet Explorer", supported "VBScript" embedded in web pages. They didn't control the market back then, so Netscape didn't bother supporting it and nobody ever used it. Therefore, Microsoft had to support JavaScript, too. The problem with that was the Evil J-Word, "Java". Microsoft hates that word, like Gollum hates sunlight. Back then, they considered the language a strategic threat because of its platform independence. Nevertheless, they had to support it -- so they named their Java implementation "J++", just so they wouldn't have to use THAT WORD. To the same end, they named their JavaScript implementation "JScript".

Whatever you call it, it's supposed to implement the ECMA-2621 standard ("ECMAScript", as if we really needed yet another annoying mixed case name for the same thing). Netscape's current version, 1.5, comes pretty close, with a few proprietary extensions (e.g. the const keyword). JScript is, um, "getting there", as they say. The current version as of January 2001 is 5.6, I believe. 5.5 "introduced" a number of member functions for the Array object2 that should've been there years ago, like push(), pop(), shift(), and unshift() (I'll have find some way to check this, but if I recall corectly the interpreter shipped with IE has been up to speed for a longer time). Since their broken earlier versions don't properly support the delete operator for Array, implementing pop() or shift() on your own involves monstrously inefficient and ugly code. At least you can do it, though, thanks to JS's weird object model. You just can't count on having those functions around with Microsoft's interpreter, is the thing. There are some other inconsistencies and missing features as well. No implementation is perfect, but really, this one has been a mess for most of its history. On the other hand, their associative array lookup is an order of magnitude or so faster than Netscape's (unless that's been fixed in NS JS 1.5; I haven't checked with that version). You pays your money and you takes your choice.

Nowadays (still January 2002) Microsoft's so-called "JScript" interpreter is implemented as a COM object which fits into the Windows Scripting Host. This is much less exciting than it sounds. Mostly it means that the teenage h4x0r d00dz of the world could be writing their so-called "email viruses" in a much more powerful and expressive language than VBScript, if only they weren't teenage h4x0r d00dz. Hurrah.




1 ECMA is a European standards body, the "European Computer Manufacturers Association": http://ecma.ch. ECMA-262 is based on Netscape's original JavaScript language developed by Brendan Eich.

2 JavaScript doesn't quite exactly have "classes" in the sense that more normal object oriented languages do; see JavaScript objects for more detail than you really want.

Log in or registerto write something here or to contact authors.