Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JScript.Net, JavaScript 2.0 and ECMAScript v4

20 views
Skip to first unread message

Erik Arvidsson

unread,
May 11, 2001, 1:05:35 PM5/11/01
to
Is JScript.Net targeted to be ECMAScript4 compliant? Will that also mean
that it will compatible with the JS2 proposals Waldemar Horwat
(AOL/Netscape/Mozilla) has submitted to ECMA (available at
http://mozilla.org/js/language/es4/index.html)? Will JScript.Net use the
same interface notation?

What are the plans for JScript beyond dot net. When can we see a ECMAScript4
compliant language in IE (or WSH)?

Erik Arvidsson
webfx.eae.net


Peter Torr (MS)

unread,
May 14, 2001, 12:22:57 PM5/14/01
to
"Erik Arvidsson" <er...@eae.net> wrote in message
news:O7dv0xj2AHA.2280@tkmsftngp02...

> Is JScript.Net targeted to be ECMAScript4 compliant?

Hi,

JScript.NET has been developed alongside ECMAScript Edition 4, but because
JScript.NET will ship before the standard, we won't be 100% compliant.

> Will that also mean
> that it will compatible with the JS2 proposals Waldemar Horwat
> (AOL/Netscape/Mozilla) has submitted to ECMA (available at
> http://mozilla.org/js/language/es4/index.html)? Will JScript.Net use the
> same interface notation?

We meet with Netscape and other companies approximately once a month to
discuss the standard -- most of the changes that are made to this proposal
are as a result of our ECMA meetings.

The standard is currently a "work in progress" although we are getting
closer to the final feature-set for Edition 4. Currently, the standard
doesn't contradict anything that Microsoft does with JScript.NET, although
it does specify additional features that we have not yet implemented. Our
hope is to implement them in future releases of JScript.NET

> What are the plans for JScript beyond dot net. When can we see a
ECMAScript4
> compliant language in IE (or WSH)?

Hopefully you will see JScript.NET for WSH in the not-too-distant future.
The plans for IE are less clear though. For one thing, it would require all
clients to have the .NET runtime on their machines, something that won't
happen for quite a while.

Peter

--
Peter Torr - pt...@microsoft.com
JScript .NET / VSA Runtime Program Manager
Please post all questions to the group. Thanks.

Jim Ley

unread,
May 16, 2001, 7:14:36 AM5/16/01
to

"Peter Torr (MS)" <pt...@microsoft.com> wrote in message
news:OKBGkIJ3AHA.2288@tkmsftngp02...

> "Erik Arvidsson" <er...@eae.net> wrote in message
> news:O7dv0xj2AHA.2280@tkmsftngp02...
> > Is JScript.Net targeted to be ECMAScript4 compliant?
>
> JScript.NET has been developed alongside ECMAScript Edition 4, but
because
> JScript.NET will ship before the standard, we won't be 100% compliant.

Any chance of ECMAScript Ed 3. compliance? JScript 5.5 shipped after the
standard, and 5.6 is still in beta, a further beta with a compliant
engine would be nice (or more importantly just the bugs fixed!)

Jim.

Peter Torr (MS)

unread,
May 16, 2001, 12:27:56 PM5/16/01
to
"Jim Ley" <j...@jibbering.com> wrote in message
news:O0t1Ymf3AHA.228@tkmsftngp03...

> Any chance of ECMAScript Ed 3. compliance? JScript 5.5 shipped after the
> standard, and 5.6 is still in beta, a further beta with a compliant
> engine would be nice (or more importantly just the bugs fixed!)

JScript 5.5 was compliant with Edition 3, except for a few cases where
back-compat was more important.

Jim Ley

unread,
May 16, 2001, 12:53:17 PM5/16/01
to

"Peter Torr (MS)" <pt...@microsoft.com> wrote in message
news:u12rrUi3AHA.948@tkmsftngp02...

> "Jim Ley" <j...@jibbering.com> wrote in message
> news:O0t1Ymf3AHA.228@tkmsftngp03...
> > Any chance of ECMAScript Ed 3. compliance? JScript 5.5 shipped after
the
> > standard, and 5.6 is still in beta, a further beta with a compliant
> > engine would be nice (or more importantly just the bugs fixed!)
>
> JScript 5.5 was compliant with Edition 3, except for a few cases where
> back-compat was more important.

And the bug - Number(0.07).toFixed(1)

and how about :

fred="dhthrjhtkre\
2ljdljflkdj"

Where are the back compatibility problems with those two? (one being
completely new in Ed3 and making toFixed unusable!)

Jim.


Peter Torr (MS)

unread,
May 16, 2001, 8:04:18 PM5/16/01
to
"Jim Ley" <j...@jibbering.com> wrote in message
news:ujLlqji3AHA.2012@tkmsftngp05...

> And the bug - Number(0.07).toFixed(1)

That's a legitimate bug -- thanks for reporting it. JScript.NET does the
right thing here, and prints 0.1.

> and how about :
>
> fred="dhthrjhtkre\
> 2ljdljflkdj"

That's a back-compat feature. ECMAScript says that you can't continue string
literals over more than one line, but we allow it as an extension to the
standard.

Jim Ley

unread,
May 17, 2001, 4:25:07 AM5/17/01
to

"Peter Torr (MS)" <pt...@microsoft.com> wrote in message
news:O4OoEcm3AHA.240@tkmsftngp07...

> "Jim Ley" <j...@jibbering.com> wrote in message
> news:ujLlqji3AHA.2012@tkmsftngp05...
> > And the bug - Number(0.07).toFixed(1)
>
> That's a legitimate bug -- thanks for reporting it. JScript.NET does
the
> right thing here, and prints 0.1.

But I've reported it before, at least now it's been acknowledged, it's
been noted in the comp.lang.javascript FAQ for a long time (8th Feb 2001,
appears to be the date it was added.)

>
> > and how about :
> >
> > fred="dhthrjhtkre\
> > 2ljdljflkdj"
>
> That's a back-compat feature. ECMAScript says that you can't continue
string
> literals over more than one line, but we allow it as an extension to
the
> standard.

C'mon, it specifically says in the standard that a string literal cannot
contain any line terminator character, so it's not an 'extension to the
standard', it's in direct violation of the standard.

See the NOTE at the end of 7.8.4 in ECMAScript Ed 3.

"NOTE A LineTerminator character cannot appear in a string literal, even
if preceded by a backslash \. The correct way to cause
a line terminator character to be part of the string value of a string
literal is to use an escape sequence such as \n or \u000A."

Now since I cannot find an implementation that does adhere to the
standard here, any chance of what actually happens being codified for
ECMAScript Ed. 4? It's currently platform independent it seems whether
any LineTerminator character is in the resulting string.

Jim.


Peter Torr (MS)

unread,
May 17, 2001, 12:33:59 PM5/17/01
to
"Jim Ley" <j...@jibbering.com> wrote in message
news:upWpWsq3AHA.2236@tkmsftngp07...

> But I've reported it before

Where did you report it? If it came to us then we should have fixed it
earlier.

> C'mon, it specifically says in the standard that a string literal cannot
> contain any line terminator character, so it's not an 'extension to the
> standard', it's in direct violation of the standard.

There's no need to quote the spec; I have a copy with me ;-)

Our implementation does not include a line terminator in the string; it
merely allows the string to break over more than one line. To insert a line
break you have to use \n or the Unicode escape equivalent.

Jim Ley

unread,
May 17, 2001, 1:00:40 PM5/17/01
to

"Peter Torr (MS)" <pt...@microsoft.com> wrote in message
news:#uy9t8u3AHA.2164@tkmsftngp03...

> "Jim Ley" <j...@jibbering.com> wrote in message
> news:upWpWsq3AHA.2236@tkmsftngp07...
> > But I've reported it before
>
> Where did you report it? If it came to us then we should have fixed it
> earlier.

I seem to have an email sending it to scri...@microsoft.com, I believe
I also posted to the MSIE 6 online bug report forms, but am not positive
of that one.

I seem to have a email I sent as a copy to yourself on the 22nd Jan.
(from my private address not jibbering.) that one, and the line
terminator one, were also sent again to your personal address on the 3rd
of May (along with some disparaging comments about the Australians
chances in the forthcoming test series..)

http://groups.google.com/groups?ic=1&selm=OdPouDGhAHA.1976%40tkmsftngp04
is the message to a microsoft newsgroup.

The discussion leading to this conclusion was in comp.lang.javascript
(although much was also via email.)

Checking my correspondance for the time, I came up with a comment:

"Perhaps the FAQ needs a Bugs pointer." ... "If I knew anywhere to point
them"
So where should bugs in javascript be posted?

> > C'mon, it specifically says in the standard that a string literal
cannot
> > contain any line terminator character, so it's not an 'extension to
the
> > standard', it's in direct violation of the standard.
>
> There's no need to quote the spec; I have a copy with me ;-)

Ah, but I'm sure everyone doesn't, I know I don't carry one on my
notebook.

> Our implementation does not include a line terminator in the string; it
> merely allows the string to break over more than one line. To insert a
line
> break you have to use \n or the Unicode escape equivalent.

The spec says "String Literal", not a String Object, so what gets placed
in the String object is irrelevant, the problem is with it being in the
String Literal at all. I also seem to recall a report that JScript on a
Mac could contain a newline like JavaScript does, but I have not tested
it, and I can't see it again in groups.google.com Of course I don't
see it as important, would just like to either have it standardised or
removed - 'cos people are answering the question "what's the javascript
line continuation character?" with "\" - when it's not, and who knows
what might happen when some standards compliant script engine authors
come along!

Jim.

Peter Torr (MS)

unread,
May 21, 2001, 12:18:28 PM5/21/01
to
"Jim Ley" <j...@jibbering.com> wrote in message
news:ujY0cMv3AHA.1452@tkmsftngp03...

> So where should bugs in javascript be posted?

Hey,

Sorry about those bug reports. I can't find any trace of them on my machine,
but then I did lose a bunch of mail a while ago when my disk went kaput.

mssc...@microsoft.com is the correct place to send bugs about JScript (we
don't ship anything called "javascript" <g>). You could probably also do it
via http://register.microsoft.com/contactus/contactus.asp but it will
probably take much longer.

> > Our implementation does not include a line terminator in the string; it
> > merely allows the string to break over more than one line. To insert a
> line
> > break you have to use \n or the Unicode escape equivalent.
>
> The spec says "String Literal", not a String Object, so what gets placed
> in the String object is irrelevant, the problem is with it being in the
> String Literal at all.

Ahhh but your example was a string primative, not an object... <g>.

But seriously, I'm guessing the reason this probably isn't in the spec is
because JScript and JavaScript behave differently. So, rather than have one
of us change and break back-compat, it has just been left out of the
standard. ECMA has a philosophy of not authoring standards that contradict
the implemenations of its members.

If the spec says "Thou shalt not do XYZ", the pragmatic thing for you (as a
user) to do is not to do XYZ. The fact that our implementation and
Netscape's implementation both give a different meaning to XYZ is not ideal,
but it's the state of the world.

> 'cos people are answering the question "what's the javascript
> line continuation character?" with "\" - when it's not, and who knows
> what might happen when some standards compliant script engine authors
> come along!

There is no line continuation character in ECMAScript in the sense of VB's
underscore. Almost any statement can appear on as many lines as you like
(there are a few exceptions, such as 'return <expr>').

Within a string literal, the way to insert a newline in the text is with \n.

If you want to continue a string literal over more than one line, the ECMA
way of doing it is:

var s = "This is a string" +
" that is split over" +
" more than one line"

where you concatenate numerous substrings.

Jim Ley

unread,
May 21, 2001, 12:36:56 PM5/21/01
to

"Peter Torr (MS)" <pt...@microsoft.com> wrote in message
news:eVLssGh4AHA.2012@tkmsftngp05...

> "Jim Ley" <j...@jibbering.com> wrote in message
> news:ujY0cMv3AHA.1452@tkmsftngp03...
> > So where should bugs in javascript be posted?
>
> Sorry about those bug reports. I can't find any trace of them on my
machine,
> but then I did lose a bunch of mail a while ago when my disk went
kaput.
>
> mssc...@microsoft.com is the correct place to send bugs about JScript

Right, noted.

> (we don't ship anything called "javascript" <g>).

no, you don't but you do ship a javascript implementation (javascript
being common parlance for the scripting language defined in ECMA-262, and
I think this usage will continue, as the JavaScript trademark holders
haven't yet made any complaints - you may also want to tell your
marketing and support departments, a google search turns up rather a lot
"javascript site:microsoft.com"

Q154585 doesn't seem to be toeing the party line either...

> If the spec says "Thou shalt not do XYZ", the pragmatic thing for you
(as a
> user) to do is not to do XYZ.

I wouldn't but trying to convince a muppet in a newsgroup to do that is a
harder proposition, they always prefer the "easy" option no matter if
it's going to fall apart in the future.

Jim.


0 new messages