Re: Look Ma, no this (was: ECMAScript Harmony)

2008-08-26 Thread Erik Arvidsson
2008/8/25 Brendan Eich [EMAIL PROTECTED]: On Aug 25, 2008, at 7:07 PM, Erik Arvidsson wrote: I've been quiet on these threads for a long time but i just wanted to emphasize Kris's point. Whatever we decide to desugar the class syntax into I think it is very important to get this right. We need

Re: Consistent decimal semantics

2008-08-26 Thread Igor Bukanov
2008/8/26 Brendan Eich [EMAIL PROTECTED]: Sam and I, not going in circles (much), agree that typeof 3m should be object, and that we add hardwired operator support for such Decimal objects. This would be very similar to QName and Namespace from E4X. typeof returns object for both but there is

online es-decimal demo

2008-08-26 Thread Sam Ruby
http://code.intertwingly.net/demo/es-decimal/ user: brendan, password: cowlishaw Instructions should be relatively self evident. Enter a bunch of expressions, one per line. Click submit. See results. Alter expressions. Repeat. Implementation notes: This simply is a CGI that shells out

dynamic class idiom

2008-08-26 Thread Dave Herman
I noticed a little idiom supported by classes-as-values: (new (class() { ... })) This essentially builds an object whose properties can be computed in an arbitrary statement context-- with loops or what have you. You might call this a dynamic singleton pattern; a throwaway factory. It's

Re: dynamic class idiom

2008-08-26 Thread Brendan Eich
On Aug 26, 2008, at 2:49 PM, Dave Herman wrote: I noticed a little idiom supported by classes-as-values: (new (class() { ... })) This essentially builds an object whose properties can be computed in an arbitrary statement context-- with loops or what have you. You might call this a

Re: dynamic class idiom

2008-08-26 Thread Brendan Eich
On Aug 26, 2008, at 4:16 PM, Dave Herman wrote: Does not say class, seems to save only a few chars (you over-parenthesize new ;-). Wait for demand? It's not about saving chars so much as introducing a new (lightweight) semantic concept: an object initializer that is a block rather than a