Finding a "safety syntax" for classes

Russell Leggett russell.leggett at
Fri Mar 23 12:48:03 PDT 2012

On Fri, Mar 23, 2012 at 3:40 PM, Allen Wirfs-Brock <allen at>wrote:

> On Mar 23, 2012, at 11:33 AM, Russell Leggett wrote:
> On Fri, Mar 23, 2012 at 2:06 PM, Brendan Eich <brendan at> wrote:
>> Brendan Eich wrote:
>>> We need to overcome at least one TC39er who values
>> "requiring an error for"
>>  use-before-init for instance properties, perhaps only if const or
>>> guarded, so (I hope) we can defer those without being hostile to them in
>>> the future.
>> Hope it was clear the first time...
> I think that   the current "maximal minimal" proposal is quite future
> friendly WRT any future hoisting variants .  Presumably any new alternative
> hoisting semantics for class declarations would only be observable in that
> some things that had been a runtime (or possible early) error under the
> current proposal might no longer be errors.  Defining a new non-error
> semantics for what was perviously an error condition is usually a safe
> change.
> I'll admit I was a little confused. Makes sense now. To be clear, you
> would be referring to:
>     let foo = new Foo();
> under the current proposal the above is also an error, because Foo is not
> yet initialized. You would never get to the next statment.

Yeah, that's one of the things that confused me. Brendan specified instance
properties, which made me think he was referring to an error that might
occur prior to actually evaluating the code.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list