[erlang-questions] Tuples Vs Maps

Theepan <>
Wed Sep 16 12:22:50 CEST 2015


The use cases of maps and tuples are completely different, they are
efficient in their own space. Maps are efficient in what you are trying to
achieve.

Theepan

On Wed, Sep 16, 2015 at 10:41 AM, Avinash Dhumane <>
wrote:

> I find it more expressive to use maps wherever I have been using tuples.
> Especially, when it comes to pattern matching.
>
> It is precise to put #{some_key := some_value} instead of {_, _, _,
> {some_key, some_value}, _, _} as a pattern.
>
> I only fear efficiency of maps over tuples, in particular the time-cost,
> not so much of space-cost.
>
> How safe will I be if I resort to use only maps freely everywhere?
>
> Thanks
> Avinash
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150916/914a5aa0/attachment.html>


More information about the erlang-questions mailing list