![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |
Useful URLs to use for further work [1] and Inheritance through Prototypes — Preceding unsigned comment added by Hannes Hirzel ( talk • contribs) 20:36, 20 December 2001 (UTC)
ECMAScript? I have never heard of it. Anyone knows the reason that we should name the article ECMAScript instead of widely-known JavaScript? -- Taku 07:06 Feb 25, 2003 (UTC)
ECMAScript is just the standardized version of JavaScript, so I think the main article should be at JavaScript. ECMAScript can either redirect to JavaScript, or can have information specifically about the standardized version (e.g., what is or is not in the standard, how the standard came about, etc.). -- Zundark 22:09 Feb 25, 2003 (UTC)
May I just quote MSDN? It makes this subject all perfectly clear.
JScript? JavaScript? ECMAScript? What's the Deal Here?
You may be confused by the term ECMAScript that I've been using in this article. You're in good company. Here's the deal. ECMA (European Computer Manufacturers Association) is a European-based association for standardizing information and communications systems. The standard recently approved, known as ECMA-262, is based on joint submissions from Microsoft and Netscape. JScript 3.0 is Microsoft's implementation of the new ECMA-262 scripting language. JavaScript is a scripting language written by Netscape that preceded the ECMA standard. Basically, when talking about JScript or JavaScript, we are talking about implementations of the same standard scripting language, ECMA -- the implementations are just marketed by different companies.
-- tyomitch 17:57, 1 September 2005 (UTC)
____
What about JScript for .NET? Is it just planned or is it in an SDK somewhere? -- Hirzel 19:51 9 Jul 2003 (UTC)
-- ThatNateGuy 22:33, 23 May 2005 (UTC)
How exactly is script-commenting "forbidden" with XHTML or XML? I think what this means is that the scripts just won't run if they're in a comment. I'm changing it in the article, just wanted to point it out here. -- ESP 05:27 20 Jul 2003 (UTC)
For XHTML, the W3C specification says to use:
<script type="text/javascript"> <![CDATA[ ... unescaped script content ... ]]> </script>
[ w3c XHTML Specification] Rgqld 06:39, 25 October 2005 (UTC)
AFAIK the User interaction and Events sections are not really part of JavaScript, but rather of the DHTML DOM. For example, when using JavaScript on the server side one cannot use the functions listed in the User interaction section, nor the events which are specific to DHTML DOM objects.
One other issue may be the example given for inheritance. The problem lies with the statement:
Derive.prototype = new Base();
This statement causes the construction of an instance of Base, and assigns this instance to be the prototype for Derive. But what if the constructor of Base needed to receive parameters? For example, consider the following:
function Base(attributeA) { this.attributeA = attributeA; }
function Derive(attributeA, attributeB) { this.constructor = Base; this.constructor(attributeA); this.attributeB = attributeB; }
d = new Derive('red', 1000); alert(d.attributeA); alert(d.attributeB);
It is not possible to do this using the Derive.prototype = new Base()
notation.
Also missing is some expansion of the explanation of the scoping rules (i.e., functions define a new scope for all internally declared function and variables), and some reference to the object specifier this
. --
RoySharon 10:27 13 Aug 2003 (UTC)
Isn't KJS suppoed to be called NJS? And the link is http://www.bbassett.net/njs/ I don't know, just asking.
It would be useful to include a section on "JavaScript Security Issues"
Is there enough reference material in this article to make a WikiBook out of it? I'd like to write a few notes about the different ways javascript can be used (e.g. using spidermonkey to embed it in your applications) and a bit on the relative power of javascript, perhaps a link to the Paul Graham article, but it feels a bit overpowered by some of the many details we have of programming this language. Ojw 21:39, 22 Jan 2005 (UTC)
I removed these three sentences from the article, under the heading "Variables":
This makes it easier to use variables than in some other languages, but results in some problems in math. For example, the JavaScript calculation 81.66*15 will give 124.899999.... instead of 124.9. This is because there are no specifications on precision.
The last two sentences are fine, but they would need to go into a different kind of section, perhaps if we added a "Critism" heading or something. (Also, it would need to be pointed out that this is a common critisim of implementations that rely on the IEEE floating point standards).
The first sentence is some kind of flaw in someone's reasoning. What does the nature of JavaScript variables have to do with "problems in math"? Its preceeding sentences were discussing scope and dynamic typing, niether of which affects mathematical precision.
func (talk) 01:56, 12 Feb 2005 (UTC)
Well spotted.
The first sentence is rubbish - the easy type conversion has nothing to do with the precision of JavaScript numbers. The second sentence is not an example of type conversion but of the fact that IEEE-754 Doubles can't exactly represent all decimal fractions.
The third sentence is also rubbish - numbers in JavaScript are represented in binary as IEEE-754 Doubles. It has nothing to do with precision, which is a measure of repeatability. As far as I know you can do 81.66*15 as many times as you like and will get exactly the same answer every time, making the maths highly precise. If a programmer fails to account for the small variances between IEEE-754 Doubles and decimal numbers, errors may be introduced (i.e. loss of accuracy, not precision). This often happens when trying to format decimal numbers: Convert to 2 decimal places. 203.5.10.172 00:59, 2 November 2005 (UTC)
"has partial support of E4X, which is the fourth revision of ECMAScript." this is wrong E4X is an language extension defined in ECMA-357
I found these bits in FAQTs [2]:
I wonder if it is true and whether we should add these bits to the LiveScript article (instead of redirecting). -- minghong 03:32, 27 Apr 2005 (UTC)
(maybe the wrong place to ask, but here I go) Does Wikipedia support JavaScript? Phlebas 19:42, 29 Apr 2005 (UTC)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |
Useful URLs to use for further work [1] and Inheritance through Prototypes — Preceding unsigned comment added by Hannes Hirzel ( talk • contribs) 20:36, 20 December 2001 (UTC)
ECMAScript? I have never heard of it. Anyone knows the reason that we should name the article ECMAScript instead of widely-known JavaScript? -- Taku 07:06 Feb 25, 2003 (UTC)
ECMAScript is just the standardized version of JavaScript, so I think the main article should be at JavaScript. ECMAScript can either redirect to JavaScript, or can have information specifically about the standardized version (e.g., what is or is not in the standard, how the standard came about, etc.). -- Zundark 22:09 Feb 25, 2003 (UTC)
May I just quote MSDN? It makes this subject all perfectly clear.
JScript? JavaScript? ECMAScript? What's the Deal Here?
You may be confused by the term ECMAScript that I've been using in this article. You're in good company. Here's the deal. ECMA (European Computer Manufacturers Association) is a European-based association for standardizing information and communications systems. The standard recently approved, known as ECMA-262, is based on joint submissions from Microsoft and Netscape. JScript 3.0 is Microsoft's implementation of the new ECMA-262 scripting language. JavaScript is a scripting language written by Netscape that preceded the ECMA standard. Basically, when talking about JScript or JavaScript, we are talking about implementations of the same standard scripting language, ECMA -- the implementations are just marketed by different companies.
-- tyomitch 17:57, 1 September 2005 (UTC)
____
What about JScript for .NET? Is it just planned or is it in an SDK somewhere? -- Hirzel 19:51 9 Jul 2003 (UTC)
-- ThatNateGuy 22:33, 23 May 2005 (UTC)
How exactly is script-commenting "forbidden" with XHTML or XML? I think what this means is that the scripts just won't run if they're in a comment. I'm changing it in the article, just wanted to point it out here. -- ESP 05:27 20 Jul 2003 (UTC)
For XHTML, the W3C specification says to use:
<script type="text/javascript"> <![CDATA[ ... unescaped script content ... ]]> </script>
[ w3c XHTML Specification] Rgqld 06:39, 25 October 2005 (UTC)
AFAIK the User interaction and Events sections are not really part of JavaScript, but rather of the DHTML DOM. For example, when using JavaScript on the server side one cannot use the functions listed in the User interaction section, nor the events which are specific to DHTML DOM objects.
One other issue may be the example given for inheritance. The problem lies with the statement:
Derive.prototype = new Base();
This statement causes the construction of an instance of Base, and assigns this instance to be the prototype for Derive. But what if the constructor of Base needed to receive parameters? For example, consider the following:
function Base(attributeA) { this.attributeA = attributeA; }
function Derive(attributeA, attributeB) { this.constructor = Base; this.constructor(attributeA); this.attributeB = attributeB; }
d = new Derive('red', 1000); alert(d.attributeA); alert(d.attributeB);
It is not possible to do this using the Derive.prototype = new Base()
notation.
Also missing is some expansion of the explanation of the scoping rules (i.e., functions define a new scope for all internally declared function and variables), and some reference to the object specifier this
. --
RoySharon 10:27 13 Aug 2003 (UTC)
Isn't KJS suppoed to be called NJS? And the link is http://www.bbassett.net/njs/ I don't know, just asking.
It would be useful to include a section on "JavaScript Security Issues"
Is there enough reference material in this article to make a WikiBook out of it? I'd like to write a few notes about the different ways javascript can be used (e.g. using spidermonkey to embed it in your applications) and a bit on the relative power of javascript, perhaps a link to the Paul Graham article, but it feels a bit overpowered by some of the many details we have of programming this language. Ojw 21:39, 22 Jan 2005 (UTC)
I removed these three sentences from the article, under the heading "Variables":
This makes it easier to use variables than in some other languages, but results in some problems in math. For example, the JavaScript calculation 81.66*15 will give 124.899999.... instead of 124.9. This is because there are no specifications on precision.
The last two sentences are fine, but they would need to go into a different kind of section, perhaps if we added a "Critism" heading or something. (Also, it would need to be pointed out that this is a common critisim of implementations that rely on the IEEE floating point standards).
The first sentence is some kind of flaw in someone's reasoning. What does the nature of JavaScript variables have to do with "problems in math"? Its preceeding sentences were discussing scope and dynamic typing, niether of which affects mathematical precision.
func (talk) 01:56, 12 Feb 2005 (UTC)
Well spotted.
The first sentence is rubbish - the easy type conversion has nothing to do with the precision of JavaScript numbers. The second sentence is not an example of type conversion but of the fact that IEEE-754 Doubles can't exactly represent all decimal fractions.
The third sentence is also rubbish - numbers in JavaScript are represented in binary as IEEE-754 Doubles. It has nothing to do with precision, which is a measure of repeatability. As far as I know you can do 81.66*15 as many times as you like and will get exactly the same answer every time, making the maths highly precise. If a programmer fails to account for the small variances between IEEE-754 Doubles and decimal numbers, errors may be introduced (i.e. loss of accuracy, not precision). This often happens when trying to format decimal numbers: Convert to 2 decimal places. 203.5.10.172 00:59, 2 November 2005 (UTC)
"has partial support of E4X, which is the fourth revision of ECMAScript." this is wrong E4X is an language extension defined in ECMA-357
I found these bits in FAQTs [2]:
I wonder if it is true and whether we should add these bits to the LiveScript article (instead of redirecting). -- minghong 03:32, 27 Apr 2005 (UTC)
(maybe the wrong place to ask, but here I go) Does Wikipedia support JavaScript? Phlebas 19:42, 29 Apr 2005 (UTC)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | → | Archive 5 |