Rationale for Dict?
brandon at brandonbenvie.com
Tue Jan 8 12:26:36 PST 2013
As to the justification, I would say it's beneficial to use a dict when you
have string keys and you want to be able to use dot property access.
Constantly having to use map.get(key) and map.set(key, value) is overly
verbose if you're using string keys.
On Tue, Jan 8, 2013 at 3:24 PM, Domenic Denicola <
domenic at domenicdenicola.com> wrote:
> In addition to Brandon's points, it seems to me a clear win from the
> "say what you mean" angle.
> *From:* es-discuss-bounces at mozilla.org [es-discuss-bounces at mozilla.org]
> on behalf of Axel Rauschmayer [axel at rauschma.de]
> *Sent:* Tuesday, January 08, 2013 15:13
> *To:* es-discuss list
> *Subject:* Rationale for Dict?
> Playing devil’s advocate: Is Dict really necessary? Whenever
> performance doesn’t matter (as much), I’d advocate Map. Otherwise, I’d
> expect programmers who want the extra speed to be comfortable with
> Assumptions about Dict:
> - You still can’t use the key '__proto__'.
> - You can’t invoke any methods on it.
> How will it implement the iteration protocol?
> Dr. Axel Rauschmayer
> axel at rauschma.de
> home: rauschma.de
> twitter: twitter.com/rauschma
> blog: 2ality.com
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss