No subject


Wed Nov 12 19:35:46 PST 2008


means that the property is non-configurable, non-writable, and
non-enumerable and has nothing to do with the 'type' (as it were) of
its value.  And that's a good example of how the proposed names are
misleading.

>
> There are 2^3 = 8 combinations of Configurable, Writable, Enumerable
> and potentially more attributes in the future. I'd prefer to control
> them independently. If multiple prefix modifiers are not appealing,
> what about some flags like the 'g' that can follow a regexp literal
> (e.g. /a/g)
>
>
> var self = {
>  toString[]: {|| '<' + self.getX() + ',' + self.getY() + '>'},
>  getX[]: {|| x},
>  getY[]: {|| y},
>  pubInstVar[WE]: 4,
>  pubInstConst[E]: -4,
> };

I find this ugly, but I don't have any great ideas.  I do want to
point out, however, that one important combination is omitted in
David-Sarah's proposal (modifier names aside).  Private instance
variables would likely be represented as non-configurable,
non-enumerable, yet writable properties.  I'm guessing that 'x' and
'y' (which are suggested by, but left out of the examples above) would
fit that description.

-Jon



>
> If no brackets are included then it would be equivalent to [WEC] as
> that is backwards compatible (I think).
>
> I'm not sure I like this idea. It is just an idea.
>
> Peter
> _______________________________________________
> Es-discuss mailing list
> Es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>


More information about the Es-discuss mailing list