[erlang-questions] maps and lager: how to handle new type gracefully?

Max Lapshin max.lapshin@REDACTED
Tue Apr 29 14:05:16 CEST 2014


Hi, I've got problem with using maps:
https://github.com/basho/lager/issues/218

Right now lager (and especially version 2.0.2) cannot print maps. It leads
to severe problems in my case, but it is another story.


If map support will be added to lager master, it means that R16 users will
not be able to use it.

Maybe I've missed some thread, but is it possible to write something like:

format(...) ->
   ...;

-ifdef(R17)
format(#{key => Value}) ->
   ...;

-endif.

format(Else) ->
   ...

Is there any preprocessor directive that will help to distinguish 17+ from
R16- ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140429/ce529b1f/attachment.htm>


More information about the erlang-questions mailing list