[erlang-questions] Maps branch and disclaimers
Robert Virding
robert.virding@REDACTED
Thu Oct 31 00:49:36 CET 2013
----- Original Message -----
> From: "Chris King" <colanderman@REDACTED>
> Sent: Wednesday, 30 October, 2013 5:13:16 PM
>
> On Wed, 30 Oct 2013 11:48:33 -0400, Robert Virding
> <robert.virding@REDACTED> wrote:
>
> > I need this ability to step through a map/dict/whatever in an
> > application I am working on (luerl). Dict does not provide this type of
> > functionality. It would be easy to hack into an orddict but I don't want
> > to use lists. Gb_trees provides an iterators but they are quite limited
> > in that they only allow you to step through the whole tree from
> > beginning to end; you can't jump in in the middle. Which I need to be
> > able to do.
>
> That answers why you need iteration through a homogeneous map-like data
> structure. I get that.
>
> But why does that need to be joined with syntax support?
No, I don't think it does need to be joined with syntax support.
I would have preferred a split solution which provided dynamic records with syntax support and a natively implemented dict module to get it faster. I personally have no need of special syntax when using it as a dictionary and, at least for me, it doesn't give any benefits. You need one for the dynamic records of course.
I was just checking through dict and I see that I actually wrote code for the functions first and next but they are commented out. I guess to preserve the API. The only difference is that they return only the key. A trivial fix. That would actually do for me. :-)
Robert
More information about the erlang-questions
mailing list