On Oct 4, 2011, at 8:35 AM, Allen Wirfs-Brock wrote:
> On Oct 4, 2011, at 12:44 AM, Brendan Eich wrote:
>
>> On Oct 4, 2011, at 5:43 AM, Russell Leggett wrote:
>>
>>> I don't want to be pushy, so this is the last time that I'll mention
>>> it, but if we can create something using the <| operator that can
>>> basically do what has been discussed for the simplest class literal,
>>
>> I think you're barking up several wrong trees. But yes, Allen proposed <|
>> and .{ to help make class-like syntax lighter-weight (if more punctuated),
>> without having real class syntax. Unfortunately any such poor-person's
>> "class unsyntax" will remain error prone (easy to leave out or misorder a
>> sub-expression) and slightly verbose (compared to just-so class syntax).
>>
>
> Brendan, It sounds like you may have missed this alternative from the
> "Minor extension to Set Literal Prototype..." thread that eliminates the
> mis-ordered or left-out constructor clause problem.
Care to summarize? I was traveling and skimming some of the long messages in
that thread.
Also, I fear we are pattern-mongering prematurely. We want something like <|
for sure (exact spelling needs work IMHO). We could have just Object.extend
instead of .{...} and some on the committee objected to the mutating nature of
a variant on dot -- they wanted .= at least -- but since there is no
requirement that the RHS be a literal, Object.extend is enough.
IINM .{...} is trying to make a shorthand, not just for its own sake but to
make a class-like pattern and reduce the perceived need for classes as sugar. I
think that's not well-motivated at this point.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss