From: VK on
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? ;-)


From: Stefan Weiss on
On 26/04/10 00:17, VK wrote:
> I propose to collect all known differences between JScript vs.
> JavaScript engines.

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.

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

It's quite current, has been discussed here, and is even linked from the
FAQ.


--
stefan
From: VK on
On Apr 26, 2:37 am, Stefan Weiss <krewech...(a)gmail.com> wrote:
> On 26/04/10 00:17, VK wrote:
>
> > I propose to collect all known differences between JScript vs.
> > JavaScript engines.
>
> 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.


From: VK on
On Apr 26, 3:19 am, Stefan Weiss <krewech...(a)gmail.com> wrote:
> 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.
From: Stefan Weiss on
On 26/04/10 01:57, VK wrote:
> On Apr 26, 3:19 am, Stefan Weiss <krewech...(a)gmail.com> wrote:
>> 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.

Yeah, I overreacted too, sorry. It appears that the one who was
embarrassing himself was I, because I linked the wrong document...

That's the one I meant:
"[MS-ES3]: Internet Explorer ECMA-262 ECMAScript Language Specification
Standards Support Document"
http://msdn.microsoft.com/en-us/library/ff520996(v=VS.85).aspx

This one covers the syntax differences, and it does have a warning about
the handling of elisions in the Array initializer:

| JScript 5.x sets the length property in step 3 to Result(2)+1. For
| example, an ArrayLiteral of the form [,] will have a length of 2
| instead of 1 as specified above.

Sorry about the confusion.


--
stefan