Newly revised Section 10 for ES3.1.
Allen.Wirfs-Brock at microsoft.com
Wed Jul 9 22:01:33 PDT 2008
I completely agree, chapter 16 needs to carry forward. We don't want to forbid implementations from experimenting with future extensions.
When there has been broad agreement across major implements on an extension (including the full semantics), I think it makes sense to standardize that consensus. If there isn't such agreement, I'm not so sure it makes sense to only standardize the compatible intersection of major implementations as that may not be a useful subset of functionality.
From: es4-discuss-bounces at mozilla.org [mailto:es4-discuss-bounces at mozilla.org] On Behalf Of Brendan Eich
Sent: Wednesday, July 09, 2008 7:00 PM
To: Mark S. Miller
Cc: es3.x-discuss at mozilla.org; es4-discuss at mozilla.org; Herman Venter
Subject: Re: Newly revised Section 10 for ES3.1.
On Jul 9, 2008, at 6:54 PM, Mark S. Miller wrote:
> On Wed, Jul 9, 2008 at 6:47 PM, Mike Shaver <mike.shaver at gmail.com>
> 2008/7/9 Maciej Stachowiak <mjs at apple.com>:
> > > Although the standard does not allow block-level function
> > I'd understood that, while ES3 didn't specify such declarations, it
> > was not a violation of the standard to have them. I agree with your
> > assessment of the compatibility impact, certainly.
> I believe the prohibition is in the ES3 syntax definition.
ES3 chapter 16:
An implementation shall report all errors as specified, except for
* An implementation may extend program and regular expression syntax.
To permit this, all operations (such as
calling eval, using a regular expression literal, or using the
Function or RegExp constructor) that are allowed
to throw SyntaxError are permitted to exhibit implementation-defined
behaviour instead of throwing SyntaxError
when they encounter an implementation-defined extension to the
program or regular expression syntax.
As Maciej notes, all four browsers extend syntax to support functions
in sub-statement contexts. There's no prohibition given the chapter
16 language allowing such extensions. Is ES3.1 specifying
"reality" (intersection semantics), or something not in the
intersection or union of existing browsers' syntax and semantics,
that is restrictive and therefore not compatible without a similar
allowance for extensions?
Chapter 16 is important to carry forward in any 3.1 or 4 successor
Es4-discuss mailing list
Es4-discuss at mozilla.org
More information about the Es4-discuss