Please have a look at the FOLDOC (
http://foldoc.org/) definition of
JavaScript:
http://foldoc.org/javascript
and send any comments or corrections via the feedback button. Thanks.
There doesn't seem to be much to recommend it at all. How can a
definition of JavaScript be considered complete if it doesn't mention
ECMAScript? Or the standards involved? Nor does it attempt to
distinguish between JavaScript, the trade mark, and the generic term
"javascript" used to describe ECMAScript implementations that interact
with DOMs, mostly in browsers.
| (Formerly "LiveScript") Netscape's simple,
What are the criteria for "simple"? If the criterion is features
provided by the base language, then ECAMScript is more complex than C,
but C is not described as simple.
| cross-platform,
That might be better as "platform independent".
| World-Wide Web scripting language, only very vaguely
| related to Java
It isn't related to Java at all, at least not any more than it's
related to say C.
| (which is a Sun trademark).
So is JavaScript.
| JavaScript is intimately tied to the World-Wide Web,
More correctly, it is used most commonly for scripting in browsers on
the World Wide Web.
| and currently runs in only three environments
If you are talking specifically about JavaScript(tm), perhaps.
| - as a
| server-side scripting language, as an embedded language
| in server-parsed HTML, and as an embedded language run
| in web browsers where it is the most important part of DHTML.
They are 3 common environments, but certainly aren't the only ones -
Adobe has ECMAScript-based languages running in database and robotics
applications too, as well as inside Flash. All might be called
"javascript".
| JavaScript has a simplified C-like syntax and is tightly
| integrated with the browser Document Object Model. It is
Better to say "...in browsers, JavaScript is tightly integrated with
the Document Object Model..."
| useful for implementing enhanced forms, simple web database
| front-ends, and navigation enhancements.
.... amongst other things, such as user interface functions,
animations, enhanced server communication and local storage and
retrieval of data.
| It is unusual in that the scope of variables extends
| throughout the function in which they are declared
| rather than the smallest enclosing block as in C.
Is that the only language feature worth mentioning? Prototype
inheritance, closures and first class objects are likely more
interesting to programmers than variable scope.
| JavaScript originated from Netscape and, for a time,
| only their products supported it. Microsoft now supports
| a work-alike which they call JScript.
Now? For at least 15 years, and not just Microsoft. This part seems to
come from about 1996.
| The resulting inconsistencies make it difficult to write
| JavaScript that behaves the same in all browsers.
That statement does not follow from the first. There are differences
that...
| This
| could be attributed to the slow progress of JavaScript
| through the standards bodies.
But there is no standard for JavaScript, it's just a trade mark. There
are standards for ECMAScript and DOMs that it interacts with.
Inconsistencies are due more to the early proprietary nature of
JavaScript and JScript, the competitive nature of their development
and the almost non-existence of WWW standards during early
development. I don't think you can blame standards bodies themselves
for the differences, they've been working to help reduce them.
| JavaScript runs "100x" slower than C, as it is
| purely interpreted (Java runs "10x" slower than C code).
As noted by others, these are pure guesses that are probably wrong for
any particular platform. It is better to simply say that as JavaScript
is interpreted and will therefore likely run slower than native code.
But since it interacts with objects and methods supplied by the host
environment, its overall speed is very much dependent on that
environment.
| Netscape and allies say JavaScript is an "open standard"
| in an effort to keep Microsoft from monopolising web software
| as they have desktop software.
Do you have a reference for that assertion?
| Netscape and Sun have co-operated to enable Java and
| JavaScript to exchange messages and data.
That seems to be a very out dated comment. Is it the only recent
development of browser scripting worth noting?
Why doesn't the dictionary provide a very brief comment about the
trademark "JavaScript" (similar to the ECMAScript entry) and link to
Wikipedia[1]? Or the Mozilla description[2]?
1. <URL:
http://en.wikipedia.org/wiki/Javascript >
2. <URL:
https://developer.mozilla.org/en/About_JavaScript >