ES4 draft: Vector

Lars T Hansen lth at acm.org
Wed Mar 5 19:12:40 PST 2008


On 3/6/08, Brendan Eich <brendan at mozilla.org> wrote:
>
> What I have wanted in the past is a variable length vector whose
>  length I can freeze at some point. Akin to sealing an object
>  completely against mutation, after mutating it into good shape during
>  its early lifetime.

Sounds like an argument for a standard meta::lock protocol in ES5 to
handle both. ;-)

This reminds me (cc'ing Erik) that an alternative to overloading
propertyIsEnumerable, which I still think is a good idea BTW because
it solves a major problem with minimal fuss, is to put new methods on
Object in a separate namespace.  (Obviously we've done that a lot
already.)  The point here is that if we stick with meta:: as the
desirable prefix for interacting with the representation, then
meta::getAttributes and meta::setAttributes would make sense.  We've
discussed this in the past, but it seemed heavy-weight and possibly
insecure and there were unclear use cases for the generality.

--lars



More information about the Es4-discuss mailing list