[99s-extend] Cowboy: Maps instead of records for context variables

Ivan Uemlianin ivan at llaisdy.com
Tue Oct 20 15:19:05 CEST 2015


Dear All

Would there be any reason against using a map instead of a record for 
the context variable in a Cowboy REST resource?

Quite often I have a few resources doing very similar things in their 
callbacks, and I'd like to abstract out the similarities into a module - 
but I don't want to share a record between modules.

Maps seem to be a good fit, and I can't think of any downside 
(performance hit should be tiny).

Can anyone give me reasons to stick with records?

With thanks and best wishes

Ivan


-- 
============================================================
Ivan A. Uemlianin PhD
Llaisdy
Speech Technology Research and Development

                     ivan at llaisdy.com
                         @llaisdy
                          llaisdy.wordpress.com
               github.com/llaisdy
                      www.linkedin.com/in/ivanuemlianin

                         festina lente
============================================================



More information about the Extend mailing list