[erlang-questions] maps or records?

Loïc Hoguin essen@REDACTED
Mon Feb 29 16:04:03 CET 2016


On 02/26/2016 03:50 PM, Benoit Chesneau wrote:
> Hi all,
>
> i tends these days to use maps instead of records, so you dont' have to
> include a file to retrieve the "schema" but I wonder if this is a good
> idea or not. Is there still some usage for records vs maps?

For what it's worth, Cowboy 2 will have a (non-opaque) map for Req, and 
still keep functions around for those that prefer or need those. So 
things like method, host, path etc. can be accessed directly from the map.

-- 
Loïc Hoguin
http://ninenines.eu
Author of The Erlanger Playbook,
A book about software development using Erlang



More information about the erlang-questions mailing list