Re: Forwards-compatible syntax proposal

2008-07-09 Thread Waldemar Horwat
I've had a request to repeat the example I showed at the meeting, so here's one: { if (false) { // Say we're introducing a new cast syntax '(expr) expr' var y = (int)/fo+/.exec(abcfoo); } push_the_button = false; { z = y/x; } } In ECMAScript parsing and lexing are

Forwards-compatible syntax proposal

2008-05-18 Thread Steven Mascaro
liorean wrote: You're basically saying that ES4 mustn't change the meaning of any ES3 program here. The problem I see with that is that it wouldn't allow any semantics expansion that reuses the old syntax forms. You'd confine all language changes to be either pure standards library ones

Re: Forwards-compatible syntax proposal

2008-05-17 Thread Steven Mascaro
On Sat, May 17, 2008 at 3:21 PM, Lars Hansen [EMAIL PROTECTED] wrote: Another reaction is that there are ES4 source fragments that /can/ be parsed by ES3 compilers, but whose meaning will silently be something completely different in the two versions of the language. Here are

Re: Forwards-compatible syntax proposal

2008-05-17 Thread liorean
On Sat, May 17, 2008 at 3:21 PM, Lars Hansen [EMAIL PROTECTED] wrote: I've spent some time examining compatibility between ES3 and ES4 [1]. Opt-in to ES4 keeps you out of most trouble. 2008/5/17 Steven Mascaro [EMAIL PROTECTED]: That's true if the programmer in question is confident that

Forwards-compatible syntax proposal

2008-05-16 Thread Steven Mascaro
Ian Hickson wrote: Another reaction is that there are ES4 source fragments that /can/ be parsed by ES3 compilers, but whose meaning will silently be something completely different in the two versions of the language. Here are some: // a generator expression in ES4, a loop calling a

RE: Forwards-compatible syntax proposal

2008-05-16 Thread Lars Hansen
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Mascaro Sent: 16. mai 2008 22:34 To: es4-discuss@mozilla.org Subject: Forwards-compatible syntax proposal Ian Hickson wrote: Another reaction is that there are ES4 source fragments

Re: Forwards-compatible syntax proposal

2008-05-14 Thread zwetan
Hi Mike, 2008/5/13 Mike Samuel [EMAIL PROTECTED]: 2008/5/13 [EMAIL PROTECTED]: what about http://wiki.ecmascript.org/doku.php?id=proposals:versioning and http://wiki.ecmascript.org/doku.php?id=discussion:versioning [snip] On developer tools and mime-types, subversion will treat

Re: application/* mime-types and SVN [Was Re: Forwards-compatible syntax proposal]

2008-05-14 Thread liorean
2008/5/14 Mike Samuel [EMAIL PROTECTED]: Ok. So it's a content-type which is not a mime-type even though it looks like one? Is there a separate recommendation that defines a mime-type for ecmascript? uri:http://www.ietf.org/rfc/rfc4329.txt -- David liorean Andersson

Re: Forwards-compatible syntax proposal

2008-05-13 Thread zwetan
On Fri, May 9, 2008 at 4:18 AM, Ian Hickson [EMAIL PROTECTED] wrote: One of the problems with ES4 relative to ES3 is that the new syntax means that a script using ES4 features doesn't work in ES3 compilers. There's not much we can do in the ES3-ES4 language migration about this. But we

Re: Forwards-compatible syntax proposal

2008-05-13 Thread Waldemar Horwat
This wouldn't work. Without syntactically distinguishing a / that is a division from a / that starts a regexp, there is no way to find the end of the block. To make this distinction you need to be able to parse the contents of the block without errors. To complicate matters further, various

Re: Forwards-compatible syntax proposal

2008-05-13 Thread Mike Samuel
2008/5/13 [EMAIL PROTECTED]: what about http://wiki.ecmascript.org/doku.php?id=proposals:versioning and http://wiki.ecmascript.org/doku.php?id=discussion:versioning ? if I read those documents well ES1-4 support backward-compatibility and later for ES5 etc. we could either use

RE: Forwards-compatible syntax proposal

2008-05-12 Thread Lars Hansen
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ian Hickson Sent: 8. mai 2008 20:18 To: es4-discuss@mozilla.org Subject: Forwards-compatible syntax proposal One of the problems with ES4 relative to ES3 is that the new syntax means that a script using ES4 features doesn't

Forwards-compatible syntax proposal

2008-05-08 Thread Ian Hickson
One of the problems with ES4 relative to ES3 is that the new syntax means that a script using ES4 features doesn't work in ES3 compilers. There's not much we can do in the ES3-ES4 language migration about this. But we _can_ prevent this problem from existing again in ES5 and up. I propose