Controlling DontEnum (was: ES4 draft: Object)

Kris Zyp kris at sitepen.com
Thu Mar 13 10:26:58 PDT 2008


> the frequency of use).  Thus on Object.prototype and as an
> intrinsic propety on Object instances:
>
>  function __createProperty__(name:EnumerableId,
>                              dontEnum:boolean=false,
>                              dontDelete:boolean=false,
>                              readOnly:boolean=false): void
I thought that this only made sense in conjunction with Neil's suggestion of 
providing the value at the same time. If you create a readonly property, how 
are you supposed to set the value otherwise? Shouldn't it be:
function __createProperty__(name:EnumerableId,
                                value,
                                dontEnum:boolean=false,
                                dontDelete:boolean=false,
                                readOnly:boolean=false): void

And if readOnly implied dontDelete, I would have guessed readOnly to be a 
little more frequent than dontDelete, but of course that is just a guess.
Kris






More information about the Es4-discuss mailing list