Call for opinions: attribute defaults and renaming "flexible"

Ingvar von Schoultz ingvar-v-s at
Sun Aug 24 14:12:13 PDT 2008

Mark S. Miller wrote:
> If a property is _configurable_, it may be deleted, its enumerability
> may be changed, it may be changed between being a data property (with
> [[Value]] and [[Writable]]) and an accessor property (with [[Getter]]
> and [[Setter]]), and it may be made non-configurable, at which point
> none of these changes remain possible.

If you try to do something that is disabled by attribute settings,
does this throw an error or just fail silently?

I ask because I was dismayed to see that ES3.1 will fail silently
if you try to assign to a const in non-cautious mode. This is hard
to debug. You'll have to avoid this const and instead use let or
var. Then errors will be better contained and easier to understand
and trace down.

> As an unfortunate implication
> of legacy issues, a non-configurable writable data property may be
> made non-writable. If it weren't for this special case, we'd have to
> split deletable from configurable.

That sounds amazing since no legacy code can call the configuring
function. Do you have a link to a discussion or information about

Of course this is just curiosity, but it really sounds very intriguing.

> If an object is non-extensible and all of its own properties are
> non-configurable, then it is _sealed_.

I think _locked_ would be more concrete, and Object.lock().

Sealed and frozen are so vague and similar that I have to think
three times to distinguish between them. Locked becomes concrete
due to the real locks that you see every day.

Thanks for a very clarifying description. This should probably be
on the wiki somewhere.

Ingvar von Schoultz

More information about the Es-discuss mailing list