Re: grammar update
Hi, Does the order of rules means different priority? otherwise why PropertyName is same as PrimaryName, and what is that number before each rule means? Regards Eric Suen ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Array Generics and null
I agree with Lars (and Mark) on this. It would be best if access to 'this' would throw. Throwing in the actual call to the function seems a bit harsh since the statement that refers to 'this' might never be reached. Making the access throw would allow people to at least catch the error and fall back on some other behavior. My vote goes to throwing an exception when a non provided this is accessed. On Sun, Mar 30, 2008 at 07:27, Mark S. Miller [EMAIL PROTECTED] wrote: On Sun, Mar 30, 2008 at 6:54 AM, Lars Hansen [EMAIL PROTECTED] wrote: The third option on the table is that the reference to 'this' inside the body of topLevel simply throws an error. This has both less and more utility: the function can't discover if it was called as a function or as a method; but functions that simply assume they were called as methods will fail earlier. Since the example function here is called topLevel, I'd like to remind everyone that the constraint we're talking about would apply to all functions -- the lexical this propagation rule is dead. Regarding the choices, * undefined is more uniform and easier to explain. * Throwing an exception is safer. * Even safer would be that a function that mentions this is considered a method, and an attempt to call it as a function throws without ever entering the function. Caja currently does the last. I'm happy with any of these choices. -- Cheers, --MarkM ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss -- erik ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Date Format?
Garrett Smith wrote: Will ES4 have a simple date formatter? ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss strftime would be uber. ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: grammar update
On 3/31/08 10:33 AM, Lars Hansen wrote: I disagree that 'enum' should be reserved in ES4. E262-3 ch 16 is explicit in allowing syntactic extensions and it appears that Opera and Firefox do not reserve 'enum', suggesting that 'enum' is not in use on the public web. I don't remember why we decided to add 'enum' to ReservedIdentifiers. Perhaps it was sympathy with the other three. Perhaps Brendan will remember. Which are the three other IE reserved words? So far as I can see, the list of reserved and contextually reserved identifiers contain only ES4 keywords. They are 'class', 'extends' and 'super'. Of these 'extends' should be contextually reserved. The other two have special meaning in a broad enough context that they should probably be generally reserved. Jd ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Date Format?
Date.prototype.toLocaleFormat(format) in SpiderMonkey provides access exactly to strftime functionality. Regards, Igor On 31/03/2008, Carl S. Yestrau [EMAIL PROTECTED] wrote: Garrett Smith wrote: Will ES4 have a simple date formatter? ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss strftime would be uber. ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: grammar update
On Mar 31, 2008, at 1:24 PM, Jeff Dyer wrote: On 3/31/08 10:33 AM, Lars Hansen wrote: I disagree that 'enum' should be reserved in ES4. E262-3 ch 16 is explicit in allowing syntactic extensions and it appears that Opera and Firefox do not reserve 'enum', suggesting that 'enum' is not in use on the public web. I don't remember why we decided to add 'enum' to ReservedIdentifiers. Perhaps it was sympathy with the other three. Perhaps Brendan will remember. At one point we were entertaining an enum proposal based on JScript.NET: http://wiki.ecmascript.org/doku.php?id=proposals:enumeration_type Old Firefox and Mozilla browsers would reserve, but we unreserved 'enum' and the rest a while ago (Firefox 1.5? I forget), instead making any use of one of these words cause a strict warning. /be ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Date Format?
On Tue, 2008-04-01 at 00:39 +0200, Igor Bukanov wrote: Date.prototype.toLocaleFormat(format) in SpiderMonkey provides access exactly to strftime functionality. As with prior discussion regarding PTC, being in SpiderMonkey is relatively useless to those of us programming for the web. Cheers, -- Nathan de Vries smime.p7s Description: S/MIME cryptographic signature ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Date Format?
2008/3/31 Nathan de Vries [EMAIL PROTECTED]: On Tue, 2008-04-01 at 00:39 +0200, Igor Bukanov wrote: Date.prototype.toLocaleFormat(format) in SpiderMonkey provides access exactly to strftime functionality. As with prior discussion regarding PTC, being in SpiderMonkey is relatively useless to those of us programming for the web. Firefox uses SpiderMonkey. Cheers, -- Nathan de Vries ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Date Format?
Second that notion. On Mar 31, 2008, at 8:24 PM, Nathan de Vries wrote: On Mon, 2008-03-31 at 16:56 -0700, Garrett Smith wrote: Firefox uses SpiderMonkey. I don't get what you mean. Firefox is part of the web, but it's not *the* web. Without being part of a standard such as ES4, Mozilla's implementation of Date.prototype.toLocaleFormat() is just yet another Javascript feature you've got to be careful about using, and will typically get wrapped in a Yet Another Library (like __noSuchMethod__ et al). Cheers, -- Nathan de Vries ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss
Re: Strict mode recap
- Disable FunctionObject.arguments (not actually in ES3 but woefully used in practice) This is an interesting one, since disallowing it would mean that the ES3.1 and ES4 specs would have to re-allow it so that they could explicitly disallow it :) Yes. It's also an interesting test of how strong our stomachs are in codifying reality. Any web browser that doesn't provide these will break (or be broken by) the web. However, it has never been specified and should never have been implemented or used. I do think that standards mode should include it and strict mode should ban it. Otherwise, de-facto JavaScript continues to differ too greatly from what's documented. One of the important goals of ES3+R/ES3.1 is to be allow people to create new JS interpreter from the spec and have it work with the web. Therefore we do need to specify FunctionObject.arguments even though we all dislike it. -- erik ___ Es4-discuss mailing list Es4-discuss@mozilla.org https://mail.mozilla.org/listinfo/es4-discuss