2013/5/21 Brendan Eich <[email protected]>

> David Bruant wrote:
>
>> This description ("arbitrary string keys", "bidirectional link with style
>> rule") suggests that you want a proxy (canonical values are in the style
>> rule, the proxy is just a façade with a bit of validation/coercion logic).
>> That's the sort of use case they've been introduced for.
>>
>
> I don't see why a proxy is required if the API is get/set/has (like
> Map's). We're not making properties appear without knowing their names, so
> this is not a proxy use-case on its face.
>

My 2c: I agree, don't express this as a proxy. You want a simple key-value
mapping. Expressing that as a proxy drags in lots of unnecessary aspects
of JS's object model (e.g. prototypes, property attributes, etc.) You don't
want/need to do that for this abstraction.

Cheers,
Tom
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to