Everything2
Near Matches
Ignore Exact
Full Text
Everything2

JScript

created by ktohg

(thing) by wharfinger (6.3 y) (print)   ?   (I like it!) 1 C! Wed Jan 09 2002 at 5:04:57

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.


printable version
chaos

JavaScript JavaScript objects ECMAScript PHP
How to make money from the internet Windows Scripting Host default.asp VBScript
ASP M728 Combat Engineer Vehicle fresh loin air root log: February 2008
George Washington's 1792 State of the Union Address Unicode Middle Eastern Scripts United States Military Bugle Calls John Adams's 1798 State of the Union Address
KB rolling hitch E2 Nodelet Collapser regular expression
Q P kbd INS
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
The best nodes of all time:
Body Farm
The biggest dose of LSD ever
catcher
Man will even get used to the gallows
Li Qingzhao's lingering fragrance
B movie
Howl
Learning a language
Fifteen Men on a Dead Man's Chest
The Getty Center
Star Wars: Episode III - Revenge of the Sith
Gram-Schmidt Theorem
A Mighty Wind
New Writeups
jessicaj
violin lessons(thing)
fallensparks
George's Marvellous Medicine(thing)
Ctrl Y
cognitive dissonance(fiction)
SharQ
Gone Baby Gone(review)
halfWit
If I could, I'd title this "Freedom"(thing)
Roninspoon
Airline Hero(thing)
Ktistec
Why Women Are Always Cold(person)
doctor wilson
Drug policy reform(thing)
tejasa
Easy Raspberry Cheesecake(recipe)
Joysim
Drug policy reform(idea)
aneurin
Tyburn(place)
niruena
Boiling to death(idea)
artman2003
summer(thing)
doctor wilson
The Silver City and the Silent Sea(log)
Dreamvirus
The Silver City and the Silent Sea(poetry)
This page courtesy of The Everything Development Company