JScript vs. JavaScript differences

V

VK

I propose to collect all known differences between JScript vs.
JavaScript engines. I am using neutral word "difference" because the I
don't want to transform it into yet another discussion about the
eternal of "one who's name should not be spelled" etc. Simply: they do
like that, X does like that, be warned.

It also only and exclusively about pure Javascript engine, so even
window.alert, confirm, prompt are out for now. Only the engine, Global
and down.

My initial contribution:

Two "God's Bugs", because subjects of special hate and obsession of
Brendan Eich himself:

GB1) Named FunctionExpression treatment

GB2) Terminal elision treatment. That one I remind is that
var arr = [0,1,]
window.alert(arr.length);
// al. == 2
// IE == 3

1) Pending comma in object initializer.
var foo = {
'a':1,
'b':2,
}
// al. OK
// IE gives syntax error
Maybe a distant relative of GB2 above. Can be very nasty without a
possibility of parallel testing on IE as occasional typo will not be
noticed, so be warned.

Anyone else? ;-)
 
V

VK

Between JScript and JavaScript or between JScript and ECMAScript? In
this context, the word "JavaScript" really is ambiguous; it appears to
refer exclusively to Netscape/Mozilla's implementation.

For me there is only JavaScript. I don't know what "ECMAScript" and
don't want to know. Yet to not transform it into a fruitless rwar
discussion, let say JScript vs. all other prominent implementations.
If "prominent implementations" absolutely necessarily requires a
separate fruitless rwar discussion, let's say like this:

"Microsoft JScript and Mozilla Firefox ECMA-262 3rd. ed. part
implementations: differences between them"

Any political correctness objections to that?

You could start with this document: "[MS-ES3EX]: Microsoft JScript
Extensions to the ECMAScript Language Specification Third Edition"http://msdn.microsoft.com/en-us/library/ff521046(VS.85).aspx

Who the hey cares about *extensions"? And who out of average coders
will study this documents in hope to see something useful for future
use? Let's make a small thing that no one did yet: get together all
implementation differences within the grammar defined in ECMA-262
3rd.ed.
Then sort out i) important to know and ii) important for profound
theoretical discussions only. Say GB2 is of the 2nd kind IMHO. When
the last time anyone used elision and how many average coders even
know about it?
From the other side - again IMHO - pending comma difference is
important to know. Who ever coded manually knows how often one types
extra comma automatically when filling the initializer.
 
V

VK

Why did you ask for comments if you don't want to hear the answers?

Sorry if being too aggressive but I am really frustrated with the
group situation where many people are ready to talk about everything
except the applied programming. There is no JavaScript, there are no
prominent browsers, there is not this, there is not that, any code may
fail on this or that browser with 0.0000000000001% market share, DOM 0
is non-standard extension that can be missed (sic!), XHR is not
standard so better not used it (sic!), let's better talk about some
fresh W3C paper...

Microsoft JScript - Mozilla JavaScript, only parts implemented by
requirements of ECMA-262 3rd.ed.
It is not all - but 70%-90% coverage at once is good enough for a
starter.

P.S. In the linked MS document I searched for "elision" - zero
matches. So whatever it is, it is already lesser full than my initial
post.

Again: I want to get together cases that people should be really aware
while making their code. Something one once encountered and couldn't
get what's wrong right away. Of course c.l.j. gurus never were in such
situations, whatever they do and see is crystal clear to them by
definition. Well, I am not so perfect as they are and such situations
did and do occur with me. Maybe - just maybe - I am not alone of the
kind. In this case some more contributions to this thread may follow.
 
D

Dr J R Stockton

In comp.lang.javascript message <2f7f2bb0-0b3a-4a52-9b6f-ba3bc2fca523@x3
g2000yqd.googlegroups.com>, Sun, 25 Apr 2010 15:17:34, VK
I propose to collect all known differences between JScript vs.
JavaScript engines. I am using neutral word "difference" because the I
don't want to transform it into yet another discussion about the
eternal of "one who's name should not be spelled" etc. Simply: they do
like that, X does like that, be warned.

Look at the big table in my js-datex.htm, noting that the yellow column
is computed by your browser. It does not (yet?) include the one in my
js-maths.htm#frSt. Include default date-to-string.

Opera 10.50 & 10.51 differ from ECMA, other browsers, and sanity in
handling of offsets from GMT. You will need to consider whether to deal
with "JavaScript" bugs (note also the handling of the month "Octopus").

You will be able to classify some differences as evident bugs, and
others as differing interpretations of what is not, or is badly,
specified.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top