The Wayback Machine - https://web.archive.org/web/20160413065922/https://en.wikipedia.org/wiki/Talk:JavaScript

Talk:JavaScript

From Wikipedia, the free encyclopedia
Jump to: navigation, search
          This article is of interest to the following WikiProjects:
WikiProject Computing (Rated B-class, High-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
 
WikiProject Internet (Rated B-class, High-importance)
WikiProject icon This article is within the scope of WikiProject Internet, a collaborative effort to improve the coverage of the Internet on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
 
WikiProject Computer science (Rated B-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
B-Class article B  This article has been rated as B-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
 
WikiProject Spoken Wikipedia
WikiProject icon This article is within the scope of WikiProject Spoken Wikipedia, a collaborative effort to improve the coverage of articles that are spoken on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 

Archives
1, 2, 3, 4, 5
Threads older than 90 days may be archived by MiszaBot I.

Timeline issues[edit]

The two sentences "Although it was developed under the name Mocha, the language was officially called LiveScript when it first shipped in beta releases of Netscape Navigator 2.0 in September 1995" and "Netscape introduced an implementation of the language for server-side scripting with Netscape Enterprise Server in December, 1994, soon after releasing JavaScript for browsers" seem to me contradictory to anyone without a time machine. Can anyone verify whether the dates are accurate? The two citations for the second sentence don't seem to establish the 1994 date as correct. 24.183.35.103 (talk) 02:28, 10 July 2015 (UTC)

"Javascript hijacking"[edit]

I believe "Javascript hijacking" is no longer in use. The standardized term for this exploit is now XSSI (Cross site script inclusion). This is a variation of CSRF that is described so we should probably create an article specifically for XSSI, link to it here and in the CSRF article.

(BTW: XSSI is also a term for extended server-side includes, so YMMV on whether the current terminology is better/worse than Javascript hijacking. In any case we probably should have a separate page for one of the other as the description here is rather spartan.)

- tychay (tchay@wikimedia) (talk)

Implicit and explicit delegation[edit]

I see that we have a new section called 'Implicit and Explicit Delegation'. I have used JavaScript for some years and I understand barely a word of this new material. I also see that where it is referenced, it cites [a Wordpress blog. If other editors agree that this is valid and WP:DUE article content, can someone also bring all the title capitalisation, word spacing and so on into line with WP:MoS?

Merger proposal with ECMAScript[edit]

The following is a closed discussion of the merger. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The merger proposal fails for lack of consensus.
   -- Yellowdesk (talk) 15:29, 17 January 2016 (UTC)



Merge Proposal

I don't think it's reasonable for the ECMAScript standard to be a separate Wikipedia article. ECMAScript is the same thing as JavaScript, and the names are interchangeable. The language standard isn't called "JavaScript" because it's a trademark of Oracle. It could be argued that JavaScript is merely an "implementation" of ECMAScript, but this is not strictly accurate. If the JavaScript article referred solely to the scripting language implementation used in Netscape (later Mozilla) products, then yes, this would make sense. Compare JScript, which has its own article. But the article doesn't: it refers to JavaScript, the standardised scripting language used not only by Netscape/Mozilla, but by Microsoft, Apple, Google, Opera, the node.js developers, and of course many others. It's not an article solely about one particular implementation.

I think that having ECMAScript be a separate article is only going to sow confusion. So, I suggest merging it into JavaScript.

Any objections? Thanks! —ajf (talk) 02:31, 17 April 2015 (UTC)

  • Additional considerations: given they are the same language, the artificial article split makes both articles suffer. The ECMAScript article lacks any information on its syntax and features, instead having to link to the JavaScript article. The JavaScript article lacks detailed information on major language revisions, ES4 and ES6 in particular, unlike the ECMAScript article... and it doesn't even link to the parts of the ES article on that subject! You could simply copy the missing ES stuff to the JS article, but then you have needless duplication. You could move it, but then the ES article is mostly just a barren husk begging for redirection, so you might as well have just merged it in. I think that ECMAScript, if it needs separate coverage at all, fits best as a subsection of the JS article. —ajf (talk) 02:57, 17 April 2015 (UTC)
  • Oppose You raise a bunch of good points. I would like to see coverage of JavaScript and ECMAScript merged, as there is no significant distinction to our readers between the two terms for the same language. As you rightly note, the term "ECMAScript" was invented for trademark reasons, not technical.
That said, I would also like to see JavaScript coverage split across more articles. As part of that, I would see different articles for JS (the overall introductory article) and JS (the language standard). That would be a matter of reader clarity and editorial structure, not splitting on the basis of the brand name.
JS is a big topic, and one in demand by readers. Our problem isn't just to write JavaScript, it's to write the whole of Category:JavaScript. We need a whole bunch of articles to fill that out properly – prototype-based OO in JavaScript, DOM handling in JavaScript, server-side JS, declarative frameworks like Angular. Lots of stuff, most of which we haven't got yet. So looking at topics by subject, and looking at the coverage of our current JavaScript and ECMAScript articles, I would still keep both of them separate. They don't overlap: JavaScript is the overall introductory article, ECMAScript is about the standardisation history. Merging would simply be WP:UNDUE for standards history in the overall article.
So I recognise your point, and suggest that we generally just refer to them as "JavaScript" throughout unless it is a specifically ECMAScript aspect – but I wouldn't merge these two articles. Andy Dingley (talk) 11:25, 17 April 2015 (UTC)
  • Oppose I agree that ECMAScript is a distinct topic from JavaScript. ECMAScript is the overarching standard above many different implementations. JavaScript is just one of those implementations. Mamyles (talk) 14:54, 7 May 2015 (UTC)
  • But JavaScript isn't an ECMAScript implementation, it is ECMAScript. They're the same language. There's no real distinction. —ajf (talk) 17:36, 7 May 2015 (UTC)
It's Wikipedia's duty to clearly and elegantly educate the reader about the nuanced distinctions between JavaScript and ECMAScript. Obviously they are not identical nomenclature, so their descriptions should be unique. Just as we have an article about Kleenex and an article about facial tissue, even though many people believe them to be interchangeable words (or items). - CoLocate (talk) 14:17, 23 May 2015 (UTC)
  • You're saying that this article is only about the language, not the implementation. However, that's not strictly accurate as some information in the article is indeed about the implementation (notably, it contains version numbers that refer to the implementation). Also, the ECMAScript article seems to "assume" that the JavaScript article is about the implementation. I think it would be a good idea to create a separate article that may be called JavaScript (ECMAScript implementation) that covers Mozilla's implementation first and then proceed with merging the other two articles. --80.123.54.19 (talk) 18:28, 10 June 2015 (UTC)
I don't think this is a good idea. I find your remarks and proposal confusing for the following reasons:
  1. The only version numbers for JavaScript I see in the article are version numbers for ECMAScript. I can't find any version numbers for JavaScript implementations.
  2. Your reference to "the implementation" suggests that there is only one implementation of JavaScript. This is not the case.
  3. Your reference to "the implementation" suggests that "JavaScript" is a term used to refer to a particular implementation of JavaScript, a JavaScript engine. This is not the case. The implementation of JavaScript in Mozilla Firefox, for instance, doesn't carry the name "JavaScript", it carries the name "SpiderMonkey".
  4. Perhaps you mean to say that the term "JavaScript" is used to refer to the JavaScript programming language as implemented by a particular JavaScript engine. This hasn't been the case for the last 15 years or so. The term JavaScript does not refer to the particular language features and restrictions of any particular JavaScript engine such as SpiderMonkey. As far as I can see, "JavaScript" is just the generic term for the language, while "ECMAScript" refers to a particular form of the language described by some version of the ECMAScript standard. Rp (talk) 21:55, 11 June 2015 (UTC)
Well, I learned something new, thanks! Apparently there's a lot of confusion on this topic and I probably got confused reading the ECMAScript article in the past which has phrases like "... implementations such as JavaScript, JScript and ActionScript." and has a quite confusing table listing "JavaScript" under "Implementation and latest version". Also, here's a similar quite from JavaScript: The Definitive Guide: "JavaScript is a trademark [...] used to describe Netscape's (now Mozilla's) implementation of the language".
Apparently however, JavaScript is obviously not the implementation, SpiderMonkey is. Officially, however, Mozilla gets to decide what the word "JavaScript" refers to - And as far as I can tell, in the past their definition was eg: "JavaScript 1.8.5 is the language that's implemented by SpiderMonkey 1.8.5". And that's also why the infobox in the article shows 1.8.5 being the stable release of JavaScript. However, according to [1] this use is now deprecated.
So to sum up, I think this is the current status: The last time something was "officially" called JavaScript was 4 years ago - back then the term "JavaScript 1.8.5" referred to the language implemented by SpiderMonkey 1.8.5. Apparently the term JavaScript will not be used to refer to a specific version/implementation in the future. I think it's also pretty obvious that whenever the term "JavaScript" is used, it usually refers to the language that's officially named "ECMAScript". So I support the merger. 193.83.25.217 (talk) 09:42, 13 June 2015 (UTC) (my previous comment was placed as 80.123.54.19)
  • I support the merger, by the way. Rp (talk) 21:55, 11 June 2015 (UTC)
  • Oppose. I think that these are clearly two concepts in the world at large, and therefore I think that two articles are the right way to present them. I don't think it is correct to include Microsoft in the list of implementers of JavaScript in the proposal - their implementation of ECMAScript is and always has been called JScript, and that's the point. A glance at ECMAScript#Implementations proves the point, to my mind. I also agree with @Andy Dingley:'s point above: this is a technology whose time has come; we should be planning to expand and deepen our coverage of all things JavaScript related, not to consolidate and embalm it --Nigelj (talk) 15:28, 12 June 2015 (UTC)
  • Historically Microsoft called their implementation JScript, yes. But that's really a footnote. Historically, due to the MS-Netscape browser war, JavaScript was a different thing to JScript, and the word JavaScript applied only to what Netscape had. That's no longer the case. It's been almost 15 years. —ajf (talk) 12:32, 4 July 2015 (UTC)
Well. I think you should take that up with the editors of the ECMAScript and JScript articles first. They currently say, for example, things like "ECMAScript is supported in many applications, especially Web browsers, where it is implemented by JavaScript, or, in the case of Internet Explorer, JScript," and "JScript supports conditional compilation, which allows a programmer to selectively execute code within block comments. This is an extension to the ECMAScript standard that is not supported in other JavaScript implementations." We cannot have contradictory information 'POV-merged' to give the false impression that there are no contradictions, when contradictions are present according to the existing refs. See for more examples, Microsoft JScript Features - Non-ECMA - MSDN Library --Nigelj (talk) 13:50, 4 July 2015 (UTC)
  • No. JScript is Microsoft's name for their JavaScript implementation, it isn't a dialect. Nor are other JavaScript implementations dialects. There is a thing Mozilla called "JavaScript", but it's not really the same JS that's the topic of the article, it's a proprietary extension that's a relic of the days before JS was standardised as ECMAScript. You might contend that JavaScript as implemented in browsers has extra features, but these are part of the ECMAScript specification itself (browser ECMAScript or something like that, I forget the exact name). —ajf (talk) 20:45, 5 July 2015 (UTC)
  • For example, the string bracket operator (e.g. myString[3]) was not standard ECMAScript until version 6, but it was in JavaScript long before that. ECMAScript 5 required use of the charAt function (e.g. myString.charAt(3)). This is a clear example of how JavaScript can possess unstandardized language features which ECMAScript does not have. —Remember the dot (talk) 16:32, 14 July 2015 (UTC)
  • Oppose. ECMAScript is an international standard describing a language, JavaScript is a language (mostly) conforming to that standard. They are not the same thing, in the same way that a blueprint and a house are not the same thing. The majority of the "for" arguments seem to be based on the idea that "JavaScript" is technically the Mozilla/Netscape implementation, but that no-one cares about that fact anymore so why bother? That seems quite weak. With the recent standards, people talk about browsers supporting "ES5" or "ES6", not "JS5" or "JS6". Given that shift in language, it seems to make sense to move the majority of the information over to ECMAScript and leave this page with a header like "This article is about the Netscape/Mozilla implementation, if you want the cross-browser (and other programs) standardised language, see ECMAScript". Make the difference crystal clear, instead of muddying the waters further. --Y_Less|⅄‾˥ǝss 14:57, 23 August 2015 (UTC)
I largely agree with this, except for a review of WP:COMMONNAME. We shall certainly have an article named JavaScript, and another named ECMAScript; the question is, in which one will most of the general information be presented? I would argue, in line with statements like, "the term or name most typically used in reliable sources is generally preferred" in policy, that this one should be the 'parent' article, and carry the bulk of the general information, leaving those like ECMAScript, JScript and so on to deal with their own aspects of the overall matter. In both formal and informal speech and writing, people – rightly or wrongly – nearly always refer to JavaScript unless they are making a specific point about dialects. --Nigelj (talk) 15:25, 23 August 2015 (UTC)
I even found a citation directly supporting this. See JavaScript: The Defintive Guide, 6th Ed, by David Flanagan, 2011[2] (Click 'Look Inside'). Quote: "In practice, just about everyone calls the language JavaScript. This book uses the name "ECMAScript" only to refer to the language standard." (Page 2) --Nigelj (talk) 17:58, 23 August 2015 (UTC)
The above discussion is preserved as an archive of the proposal. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Can we name "ECMAScript 6" as the current stable release?[edit]

The article's infobox is currently saying that the most recent stable release of JavaScript is version 1.8.5, which was the language version included in Firefox 4. After 1.8.5 Mozilla stopped using the term JavaScript for their specific version of the language, so there will be no more versioned releases of JavaScript coming from Mozilla. [3][4]

For this reason and because this article is about JavaScript in general, not about the Mozilla-specific version of it, I think it would be a good idea to specify ECMAScript 6 as the most recent version of the language in the article. May I change this? --2A02:8388:12C0:7F80:76E5:BFF:FECD:24A6 (talk) 08:36, 18 June 2015 (UTC)

More Advanced Example[edit]

ERROR ON LINE 15: Bad invocation.
ERRORS ON LINE 38: Missing semicolon; Expected '}' to match '{' from line 20 and instead saw ':'.; Expected '}' to match '{' from line 18 and instead saw 'function'.; Missing ';' before statement.

ERRORS ON LINE 48: Expected an identifier and instead saw ','; Missing semicolon.
WARNINGS ON LINE 49: Label 'toString' on function statement. Missing name in function declaration.
ERROR ON LINE 52: Expected '(end)' and instead saw '}'.
() {"" — Preceding unsigned comment added by 165.139.21.52 (talk) 13:33, 1 March 2016 (UTC)

The three essential technologies[edit]

I see that an IP editor has been edited warring over trying to add PHP as a fourth 'essential technology' of the Web. The problem is that, although they have some usage stats on PHP, they don't have a source for 'the four essential technologies' of the www. It is exactly this kind of synthesis that is forbidden by WP:SYNTH. --Nigelj (talk) 12:47, 12 April 2016 (UTC)

Navigation menu

Personal tools

Namespaces

Variants

More

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.