[erlang-questions] A modest proposal to eliminate tuples

Fred Hebert mononcqc@REDACTED
Wed Aug 27 22:55:55 CEST 2014


On 08/27, Chris Pacejo wrote:
> I apologize for the troll, but my past direct attempts to bring this
> issue to the list's attention have been lost in long threads with
> little to no discussion.  I just fear an Erlang ecosystem in which,
> five years hence, this singular "map" structure is used for such
> wildly distinct purposes that we are forced to accept that they are
> opaque, unanalyzable, and slow, and nothing can be done about it.
> 

I fear the same. In http://learnyousomeerlang.com/maps, I made a
conscious effort to distinguish maps from records, for example.

I don't necessarily fear  maps replacing tuples in the general case
({point,X,Y} still is fast to write vs. Point#{x := X, y := Y}), but
their overlap with records and the dynamic vs. static set of keys is a
lot less obvious.

A rich type zoo is fun and practical to have, it would be a shame to
conflate all the things in the structure.



More information about the erlang-questions mailing list