[erlang-questions] Maps branch and disclaimers
Chris King
colanderman@REDACTED
Wed Oct 30 15:03:59 CET 2013
On Wed, 30 Oct 2013 09:51:27 -0400, Björn-Egil Dahlberg <egil@REDACTED>
wrote:
>
>>
>> I don't get this use case. Why do you need syntax support for a
>> key-value map where you don't know a priori >>what the keys and values
>> are? Why don't dict() and friends suffice?
>>
>> To me this is akin to iterating through a record/tuple.
>
> Actually these functions are needed, at least one is needed internally,
> I think.
>
> It should be covered in comprehensions with Maps generators. Maps
> generators needs next(Key, Map).
>
> But for small Maps and record like behaviour they are not needed. =)
Mm, I think I disagree about the need for map-generators as well.
Couldn't that be equally well served by implementing a qlc dict() source?
Well I shouldn't complain too much. Richard O'Keefe and I both argued
strenuously against conflating heterogeneous (record-like) and homogeneous
(dict-like) maps months ago but I guess that ship has sailed.
I will just avoid using the dict-like features of these maps in my code,
and hope that I am not forced to do so by the standard library or by
popular applications.
BTW, is there a plan for a type notation for these new maps, or for how to
get Dialyzer to usefully type-check them?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20131030/530d9b8f/attachment.htm>
More information about the erlang-questions
mailing list