[erlang-questions] Wanted additions to the maps module?
zxq9
zxq9@REDACTED
Mon May 9 15:28:38 CEST 2016
On Monday 09 May 2016 15:22:17 Lukas Larsson wrote:
> On Mon, May 9, 2016 at 2:54 PM, zxq9 <zxq9@REDACTED> wrote:
>
> >
> > That's my whole point. Why the desire for a next/1 and previous/1
> > instead of a list-style operation over the map as a whole, since
> > outside of an abstract sense of "doing something with each element"
> > there is nothing interesting that can possibly be gained from
> > introducing an implicit concept of order?
> >
>
> For one thing Mr. Virding needs them to implement his lua erlang language
> thing :) We also could make great use of them in the standard libraries to
> build efficient variants of maps:fold and friends.
>
> I'm sure there are usecases that we have not seen yet that will come up.
> I've learned over the years that people never use the API:s you create the
> way to expect them to be used and always come up with the strangest and
> cleverest ways of doing things.
Sure, internally I imagine there are a million super slick ways to use this,
and I lack the imagination to see what they may be.
But is that the level of abstraction that maps are meant to be as exposed
to me as a user of a hash map implementation?
I'm not trying to naysay, just grasp the reasoning -- from the point of
view of API and language design. This seems extremely inconsistent with
what I expect of a "map" implementation. Or perhaps my expectations are
flawed and "map" means something different now (just like other terms
like "object", "REST" and "API"...).
-Craig
More information about the erlang-questions
mailing list