[erlang-questions] [ANN] otp_vsn 1.0.0 - ?OTP_VSN

Pierre Fenoll pierrefenoll@REDACTED
Fri Apr 20 16:29:08 CEST 2018

@Marc Worrell
Thanks for the kind words! The end goal is exactly that and I am working on
defining the expected macros in a way that makes sense.
Any input appreciated, notable edge cases, ...

@Loïc Hoguin
Thanks for taking a look! So I think I have pushed a v1 too early:
*_AND_ABOVE and *_AND_BELOW are both inclusive of the current OTP version.
I'm thinking of dropping the *_AND_BELOW and using a common macro prefix
anyway... It's already time for a v2!

Pierre Fenoll

On 20 April 2018 at 13:08, Marc Worrell <marc@REDACTED> wrote:

> > On 20 Apr 2018, at 12:51, Pierre Fenoll <pierrefenoll@REDACTED> wrote:
> >
> > I just released a library called otp_vsn which defines helpful macros if
> you write code that spans multiple OTP releases.
> >
> > For example if you want to use the #{maps => syntax} but still be able
> to compile your code on releases earlier than 17.5 you can use
> ifdef(OTP_VSN_17_AND_ABOVE).
> Nice work, I especially like that it is only a header file.
> I have an idea, might be somethiing to add.
> Instead of relying on the OTP version for some features.
> Maybe add a macro like ‘OTP_SUPPORT_MAPS’ ?
> Another we often define is for the changes in the dict() type, which
> became dict:dict() at some point.
> In our rebar files we currently have definitions for this kind of defines.
> Would be very convenient to have those at a more central place, and one
> that is consistent between projects.
> Thank you for your library!
> Marc Worrell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180420/a66eb6ad/attachment.htm>

More information about the erlang-questions mailing list