Finding a "safety syntax" for classes

Russell Leggett russell.leggett at
Tue Mar 27 12:12:20 PDT 2012

On Tue, Mar 27, 2012 at 2:59 PM, Brendan Eich <brendan at> wrote:

> Russell Leggett wrote:
>> Can we make it writable:false, configurable:true? Of course, that would
>> only be a minor deterrent from changing it around, but maybe just enough?
> This has zero integrity, so is IMHO worse than worthless -- it's
> misleading. Not that anyone will count on it, but stopping assignments
> while allowing reconfiguration or deletion and redefinition does not smell
> right.

I thought you'd probably say that, it was just a thought.

One thing we could do, is leave constructor writable/configurable, and then
add a new private name property [ctor] that is always reliable. This would
give people something to work with without really touching
prototype.constructor. Of course, that doesn't help David's case. He really
would need more of a mirror API to achieve that.

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

More information about the es-discuss mailing list