Talk:JavaScript/Archive 1

message: Useful URLs to use for further work  and Inheritance through Prototypes — Preceding unsigned comment added by Hannes Hirzel (talk • contribs) 20:36, 20 December 2001 (UTC)
thread_title: Untitled

message: 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)
replies: text: Be aware that there are JavaScript 1.5 Guide and JavaScript 1.5 Core Reference at developer.mozilla.org, in wiki format. The first of the two resource is a comprehensive book on the topic, so I'm unsure if it's reasonable to start another one, unless you would like to focus on the differences between Mozilla and Microsoft implemntations. --asqueella 23:36, 10 July 2005 (UTC)
thread_title:  Inheritance 

message: 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)
thread_title:  Variables and Math 

message: "has partial support of E4X, which is the fourth revision of ECMAScript."
this is wrong
E4X is an language extension defined in ECMA-357
:OK, I changed it to:
::...has partial support of E4X, which is a language extension dealing with XML, defined in the ECMA-357 version of ECMAScript.
:is that correct? func(talk) 21:24, 12 Apr 2005 (UTC)
replies: text: Almost. The only thing that was slightly wrong is "ECMA-357 version of ECMAScript". ECMA-357 is not a version of ECMAScript. It's a separate standard, defining a few extensions to ECMAScript, which can be applied to different versions of ECMAScript. I updated the sentence. --asqueella 23:02, 10 July 2005 (UTC)
thread_title:  Concerning E4X 

message: I found these bits in FAQTs :
:Netscape's LiveScript was actually derived from CEnvi. CEnvi was a powerful yet easy to use interpreted version of the C programming language developed by NOMBAS (http://www.nombas.com). Of course, NOMBAS has since changed the name of its language to ScriptEase(TM) and expanded the implementation (marketed as ScriptEase Desktop) significantly, particularly to conform to the ECMA standards and to ensure cross-platform compatibility.
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)
replies: text: This is really fascinating; something that I've never heard of before. We need information on it somewhere. func(talk) 20:40, 29 Apr 2005 (UTC)
thread_title: History of JavaScript