[erlang-questions] Wanted additions to the maps module?

Michael Truog mjtruog@REDACTED
Sat May 7 04:43:03 CEST 2016


On 05/06/2016 10:25 AM, Robert Virding wrote:
> Yes, I am not alone in wanting these!
>
> Robert

I agree iterators on maps are helpful.  However, I think it is important to make sure the iterator returned from maps:first/1 is its own separate type.  In the past when you have suggested this, you appeared to indicate that the iterator would be a side-effect on the Map data.  However, if that was the approach, it would be limiting the map to using a single iterator at a time.  Other reasons exist why this would be a bad approach: potentially hiding side-effects of iterator usage in ways not represented by types, in ways that dialyzer wouldn't handle (the maps type is already complex), being the source of errors due to the lack of transparency (i.e., it should be breaking referential transparency).  So, the interface of maps:first/1 and maps:next/2 sounds good as long as it is dealing with a maps iterator type and not the map itself.

>
>
> On 6 May 2016 at 18:12, Jean Chassoul <chassoul@REDACTED <mailto:chassoul@REDACTED>> wrote:
>
>
>     On Thu, Apr 21, 2016 at 5:09 PM, Robert Virding <rvirding@REDACTED <mailto:rvirding@REDACTED>> wrote:
>
>         My maps:first/1 and maps:next/2will be coming when? :-)
>
>
>     +1
>
>     (=
>
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160506/2bcbab09/attachment.htm>


More information about the erlang-questions mailing list