Talk:ECMAScript

From Wikipedia, the free encyclopedia

The article is very bad.

ECMA-262 is the still the one and only language specification (currently in its 3rd edition) of the ECMAScript language. ECMA-357 defines just a language extension for ECMAScript called E4X (for better dealing with XML) but it does not define or revise the language itself, i.e. ECMA-357 is not revision 4 of the ECMAScript language!

To quote from the ECMA-357 standard: "This Standard was developed as an extension to ECMAScript Edition 3" and "This Standard will be integrated into future editions of ECMA-262 (ECMAScript)".

The table about the dialects and its corresponding ECMAScript editions is wrong, too. JScript.NET does not implement ECMA-357 but implements Microsoft's draft of ECMAScript 2.0. To quote from Microsoft MSDN: "In addition, JScript .NET is being developed in conjunction with ECMAScript Edition 4 and incorporates many of the proposed features of that language as well."

Edition 4 of the ECMA-262 language specification will define ECMAScript 2.0, but is not officially announced yet. It is very likely that the language will differ from the current version of ECMAScript in many ways. For example, the current version of ECMAScript uses object-based inheritance with prototypes whereas ECMAScript 2.0 will support class-based inheritance, too. Today, there are some drafts and prototypical implementations like JScript.NET but edition 4 is not officially adopted by ECMA.

-- Oliver

I tried to clear up the confusion, removing the false references to E4X being ECMA-262 edition 4. --asqueella 22:10, 10 July 2005 (UTC)

JScript.NET is not a client side/browser based scripting language. Should it even be included in the article?

Why should that make a difference? ECMAScript is a language specification; it doesn't say for what the language must be used. Some possible uses might be adding scripting support to a graphics editor, an animation package, or a game engine, not to mention Server-side_JavaScript.

2006.01.31 0949 ETZ
Updated: the Dialects section in response to Firefox 1.5 being out of Beta. Also changed the link to the Moz E4X docment.
-Derek A. Muenzel
www.munzy.net
damunzy@gmail.com


Contents

[edit] ECMAScript article vs. JavaScript article

As I see it, JavaScript is to ECMAScript as Pepsi is to cola, that is, JavaScript® refers to Netscape's implementation of the ECMAScript language (and implementations derived from it under the Mozilla license). So why is the description of the language itself in the JavaScript article rather than this article? --Damian Yerrick () 00:15, 17 February 2006 (UTC)

Mostly because JavaScript is not Netscape's implementation of ECMAScript; ECMAScript is a standardization of JavaScript. ECMAScript didn't exist before JavaScript (and didn't become widely known until much later, in fact), so it makes sense to describe the language as it came to be and as it is now in the context of JavaScript. In fact, nobody ever refers to "ECMAScript" unless they want to stress cross-implementation compatibility, since "ECMAScript" sounds like a Lovecraftian monstrosity. Your Pepsi analogy therefore isn't sound, and just because a committee has decided that the standard part of the language shall henceforth be called ECMAScript doesn't make it the dominant topic. I think Wikipedia is accurately reflecting real-world usage here. 82.92.119.11 03:10, 17 April 2006 (UTC)

[edit] please consider merging ECMAScript Variables into this article

Merging will improve the quality of THIS article and remove an article which is probably not worthy of remaining as a stand-alone article. Both need some rewrite work to bring them up to standard, however.

Um...why? I believe it has been generally agreed that syntax is covered in the JavaScript article, leaving this article to discuss other matters related to the standardization. I have removed the section, as I strongly believe it was originally created as an advertisment for a commercial product: [1].

[edit] Out of place product plug

This sentence "You can edit JavaScript by JavaScript editor. " contains a link to a vendor site. The sentence is out of place (the paragraph discusses variables and types) and does not generally provide useful information.

[edit] History section incorrect

The following comments were left in the history section of this article by an anonymous user (diff):

The initial history is not entirely correct. Netscape, then Mosaic Communications Corp developed a server-side scripting language named LiveScript for their commercial web server offering. LiveScript made its public introduction about the same time NCSA forced MCC to change its name to Netscape.
After it's introduction, Netscape began work on a client-side version of LiveScript. Days before its public release, Netscape changed the name from LiveScript to JavaScript. Sun initially bawked at the name, but because of Netscape's partnership with Sun on the JVM implementation, Sun did not pursue action against Netscape.

I've added a {{cleanup-section}} tag to the section and moved the comments to the talk page. Someone ought to update the section based on these comments. -- intgr 16:20, 8 November 2006 (UTC)


The anonymous user is mistaken about at least three things:

1. I developed "Mocha" (the original codename) as an embeddable interpreter meant for use in both Netscape's server and client, in about ten days in May 1995 (Ken Smith helped by translating java.util.Date, Y2K bugs and all, into C to implement the Date class). This was intended to go in the client and server in the same release, the 2.0 version of Navigator and the matching server and authoring/site-management tools release. The "LiveScript" name came about later, after a trademark search found "Mocha" already in use in the field of software.

2. The anonymous user's chronology is all wrong. My work creating the Mocha interpreter in May 1995 was well after NCSA forced Mosaic Communications Corporation to change its name (I joined Netscape, not MCC, in early April 1995).

3. Sun, or at least Bill Joy, supported the name JavaScript and granted a trademark license for it to Netscape from Sun in early December 1995. Netscape 2.0 did not release until some time in January 1996 -- not exactly "Days before its public release".

Cleanup based on false anonymous claims should wait for corroborating testimony from eyewitnesses (primary sources all died on old machines like the SGI Indy I used at the time).

--Brendan Eich 14:43, 27 February 2007 (UTC)

There isn't much point in waiting for "corroborating testimony" - the present text gives no sources for its claims, and has had a cleanup tag on it for 2 months now. Even if your rewrite will have no references either, it will be no least authoritative at worst - and taking into account your unique position, your version would certainly be the preferred one. So, be bold and just fix it =) -- int19h 18:15, 27 February 2007 (UTC)

[edit] Origins of LiveScript

I think the history section of ECMAScript could do with a very small mention of a company called Nombas. When I was researching javascript implementations, I found that the (now defunct) company Nombas had been a very early driver of this technology. Their summary:

In 1992 and 1993 Nombas developed a language named Cmm (for C minus minus, or "C without the hard stuff") for use as an embeddable scripting language, showing that it was possible to have a full-powered language that was simple enough to replace macro languages. Years later we would change the language name to ScriptEase, because Cmm was "too negative, and the letter 'C' scared people". Cmm was first released in a shareware product called CEnvi, which won awards and fame and is now available as ScriptEase:Desktop. ... When Netscape's first commercial browsers were released we made a version of CEnvi that could handle short scripts embedded within web pages. By embedded scripts within the page we allowed the client side to handle processing, rather than making all dynamic interaction happen on the server. This brought immediate client-side interaction with the user. The advantages of client-side handling were made obvious by Nombas' "Espresso Pages", and Netscape soon began work on their own version, which they called LiveScript, and then renamed to JavaScript just before its final release. [2]

Nombas's ScriptEase product subsequently converged with ECMAScript, the company was subsumed into OpenWave and ScriptEase was withdrawn from market.

I have found little information on exactly how much CEnvi influenced LiveScript. Nombas's history is silent on the topic, although the use of the word "version" suggests that the language was compatible, if implemented independently. At least one source makes an explicit claim of derivation:

Netscape's LiveScript was actually derived from CEnvi, the original forerunner to what is now known as JavaScript. [3]

This is probably meant to refer to LiveScript and CEnvi as a language, rather than as a software system.

Another source implies that only the 'idea' of client-side scripting was transmitted.

Little did Nomba know that its ideas would become an important foundation for the Internet. [4] (from 'Professional JavaScript for Web Developers', Zakas 2005)

The only documentation I have on the ScriptEase product comes from the era when it was ECMAScript-compliant, so I do not know precisely what the language looked like prior to 1995. However, I can say from reading the docs carefully that the language must have had a significant resemblance to ECMAScript from its inception: namely a C-like syntax and an object-prototype model. Neither of these features are in themselves original, but I suspect that it's language design was used by Netscape as a basis for LiveScript.

Anyway, if this heritage is true, what concerns me is the many widespread implied assertions that the language we know today as ECMAScript originated in LiveScript with Brendan Eich. This belief is found in many texts (including the ECMA 262 document itself), and is usually phrased to read that Netscape developed LiveScript independently and originally:

JavaScript was originally developed by Brendan Eich of Netscape under the name Mocha, later LiveScript ... (Wikipedia JavaScript article, my emphasis)
Brendan Eich invented Javascript' ... 'JavaScript was created by Netscape programmer Brendan Eich. [5]

These may be strictly true if you consider JavaScript as a product; and I think that it is very fair to say that Netscape really were the original catalyst for this language's explosion in use, but I suspect that as a language, originality lies with Nombas. DLeonard 14:56, 26 January 2007 (UTC)

Update: I just found this 1994 zip file: http://ftp.monash.edu.au/pub/palmtop/cenvid.zip - It strikes me that Cenvi was an advanced awk for DOS! Most interestingly, there is very strong evidence of Javascript's signature object-prototype-cum-array system in PATHSUBS.BAT's BuildSubsArray() function. However, was Cenvi itself modeled on something else, I do not know. DLeonard 15:33, 26 January 2007 (UTC)


Hello. I first met Brent Noorda in late 1996, when Netscape brought JavaScript to ECMA for standardization. I had never heard of NOMBAS or its products before then. When I created JS in May 1995 (in about ten days for the core language implementation; the rest of that year was consumed by the DOM and browser embedding work), my influences were awk, C, HyperTalk, and Self, combined with management orders to "make it look like Java." --Brendan Eich 22:31, 21 February 2007 (UTC)

[edit] Influenced by perl?

I found it weird to see that ECMAScript had *Perl* in its list of influenced, so I removed it. User:Mfc added it back with the comment "ECMAScript regular expression definition was explicitly based on Perl". If that's the logic behind listing it in influences, then why don't we also list C (JS syntax was explicitly based on C), Java (the name), and so on? Perl-like regular expressions are part of most modern languages, so it's not worth listing perl as an influence just because of that IMO. --asqueella 17:21, 17 February 2007 (UTC)

[added later] brendan says above "my influences were awk, C, HyperTalk, and Self, combined with management orders to "make it look like Java.". Perhaps this is what should be in the article? --asqueella 16:51, 23 February 2007 (UTC)

I think the point was that regexps as a feature inherent to the language (and not, say, part of a standard library) originate from Perl. Nonetheless, I do not think it is enough to classify ECMAScript as influenced by Perl - by that logic, we'd have to say that it is also influenced by Pascal, since that's where the keyword "var" comes from... -- int19h 19:36, 17 February 2007 (UTC)
I'm not sure I follow the question, here. I chaired the meetings where the regular expressions from Perl were incorporated into the ECMAScript language standard (Brendan Eich was there, too). That committee decided to use the Perl definition for regular expressions (with some modifications, clarifications, and corrections) as the basis for those in ECMAScript. In fact (as far as I have been able to find) that was the first standardization of regular expressions. Both languages influenced and improved each other, at many times. mfc 20:50, 24 February 2007 (UTC)
My apologies, I did not realize you were adding it from your own experience. These lists are not sourced (it's pretty hard to find a source backing the "influenced by" claim, apart from the authors themselves), so there's always doubt about what should and what shouldn't go there. It seems clear enough now. BTW, one more thing to do - the languages listed in "influenced by" section here should in turn have ECMAScript in their respective "influenced" sections. -- int19h 10:18, 25 February 2007 (UTC)