Finding a "safety syntax" for classes

Russell Leggett russell.leggett at gmail.com
Wed Mar 21 11:52:29 PDT 2012


On Wed, Mar 21, 2012 at 2:47 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

>
> On Mar 21, 2012, at 8:41 AM, Russell Leggett wrote:
>
>
>
> On Wed, Mar 21, 2012 at 11:12 AM, Kevin Smith <khs4473 at gmail.com> wrote:
>
>>
>>>    1. I think its easier to explain - it will actually result in a
>>>    constructor on the prototype.
>>>    2. The actual constructor function and the .constructor property
>>>    really should always be in sync - this helps with that.
>>>    3. "new" doesn't have those benefits - people might expect to be
>>>    able to call .new() like in ruby.
>>>    4. "new" conflicts with the new <object> proposal.
>>>
>>> There are some minor practical considerations on the "constructor" side,
>> and aesthetic considerations on the "new" side.  Instead of squaring off
>> now, can we just agree to leave if off the table temporarily?
>>
>
> Agreed, table it.
>
>
> We have to make a decision or a spec. can't be written.  There needs to at
> least be a stake in the ground.  it looks to me like that stake is
> "constructor"
>

Yes, I interpreted it as constructor for now, and we can argue it later.


>
> Allen
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120321/0422ad06/attachment.html>


More information about the es-discuss mailing list