Got it. A primitive for string-to-value maps that exposes functionality that is
already there.
But then it sticks out from all other primitives, which have wrapper types and,
via them, methods that can be called.
If accessing dict entries had a different syntax that problem would go away:
> I do not yet fully understand the rationale behind dicts.
Nothing fancy, really. Just an idiomatic way to create a non-polluted
string-to-value map. In ES5 you can use Object.create(null), which is not bad
but still kind of a hack. Wouldn't it be nice to have sweet literal syntax for
a dictio
On Mon, Oct 17, 2011 at 12:54 AM, Axel Rauschmayer wrote:
> http://wiki.ecmascript.org/doku.php?id=strawman:dicts
>
> I do not yet fully understand the rationale behind dicts. I have two
> questions:
>
> - Why does it need to use the same mechanism for looking up keys as
> objects? Couldn’t metho
http://wiki.ecmascript.org/doku.php?id=strawman:dicts
I do not yet fully understand the rationale behind dicts. I have two questions:
- Why does it need to use the same mechanism for looking up keys as objects?
Couldn’t methods be introduced for this? Then a dict could have other methods,
too (
4 matches
Mail list logo