Got it. Thanks! Jd
On 11/12/07 10:25 AM, Peter Hall wrote: > Also, there is a minor bug [1] with the pragma syntax: > > Pragma : > UsePragma SemicolonFull > ImportPragma SemicolonFull > > UsePragma : > use PragmaItems SemicolonFull > > > resulting in two semicolons being required after a "use" pragma. > > > Peter > > > [1] http://wiki.ecmascript.org/doku.php?id=proposals:syntax_for_pragmas > > > > > > On 11/12/07, Peter Hall <[EMAIL PROTECTED]> wrote: >> What is the scope of a pragma such as that? Is it just the current >> lexical scope, like a "use namespace" statement, or does it change the >> behaviour for the entire program? If it's the latter, isn't there a >> compatibility problem between libraries? If it's the former, do you >> anticipate that es4 programs will be littered with "use strict" >> pragmas? Think Fortran and "implicit none".... >> >> I assume this has been previously discussed, but I couldn't find it, >> so apologies if that is the case. >> >> Peter >> >> >> On 11/12/07, Brendan Eich <[EMAIL PROTECTED]> wrote: >>> On Nov 12, 2007, at 9:00 AM, Jonathan Watt wrote: >>> >>>> Hi, >>>> >>>> As I understand it the reason assignment to ReadOnly properties >>>> fails silently >>>> is that there was no try-catch prior to ECMAScript 3. >>> >>> Right. Netscape 2 reported a fatal error, but during ES1 >>> standardization we agreed to go with silence is (golden|deadly). >>> >>>> Could/will edition 4 require an exception to be thrown in strict mode? >>> >>> Overtly incompatible, also highly desirable. So opt-in versioning >>> could enable this, but it's one more migration headache (see recent >>> exchange between Mark Miller and myself). An alternative would be a >>> pragma of some sort: >>> >>> use readonly error >>> >>> or perhaps >>> >>> use readonly throw >>> >>> We try to make pragmas more readable, sometimes with an extra word; >>> not sure this is the best way to phrase it still, but the idea would >>> be to enable throwing of a ReadOnlyError on assignment to a ReadOnly >>> property. Comments? >>> >>> /be >>> >>> _______________________________________________ >>> Es4-discuss mailing list >>> [email protected] >>> https://mail.mozilla.org/listinfo/es4-discuss >>> >> > _______________________________________________ > Es4-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es4-discuss _______________________________________________ Es4-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es4-discuss
