Newly revised Section 10 for ES3.1.

Allen Wirfs-Brock Allen.Wirfs-Brock at
Wed Jul 9 23:18:52 PDT 2008

This is currently stated in section 4.2.2 of the draft as:

With one exception, an ECMAScript program that is voluntarily limited to a usage subset  and which executes without error under the subset's restrictions will behave identically if executed without on any usage subset restrictions. The exception is any situation where the operation of such a program depends upon the actual occurrence and subsequent handling of additional error conditions that are part of the subset.

From: Mark S. Miller [mailto:erights at]
Sent: Wednesday, July 09, 2008 10:48 PM
To: Allen Wirfs-Brock
Cc: Garrett Smith; es4-discuss at; Herman Venter; Pratap Lakshman (VJ#SDK); Douglas Crockford
Subject: Re: Newly revised Section 10 for ES3.1.

On Wed, Jul 9, 2008 at 10:35 PM, Allen Wirfs-Brock <Allen.Wirfs-Brock at<mailto:Allen.Wirfs-Brock at>> wrote:
Every valid proposed ES3.1 cautious subset program is also a valid program in the full language.

I don't think it works to restate the "fail stop subset" notion in terms of validity. Rather, we can say that an ES3.1 cautious program that runs without causing any cautiousness-induced failures will run the same way in the full language. Put another way, Given an alleged ES3.1 cautious program, it will

* be statically rejected
* cause a failure by violating a dynamic cautiousness restriction
* execute as it would in the full ES3.1 language.

For example, the following is a perfectly *valid* ES3.1 cautious function:

function isCautious() {
  function foo() {this;}
  try { foo(); } catch (e) { return true; }
  return false;

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Es4-discuss mailing list