[erlang-questions] Fourth draft of EEP 44 - Additional preprocessor directives

Kenneth Lundin kenneth.lundin@REDACTED
Thu Jun 2 10:52:39 CEST 2016


See a separate mail about EEP 44 and 45 that I just sent.

The information is also on www.erlang.org

/Kenneth

On Thu, Jun 2, 2016 at 2:29 AM, Michael Truog <mjtruog@REDACTED> wrote:

> On 10/29/2015 06:08 AM, Björn Gustavsson wrote:
>
>> Here is the fourth draft with more clarifications.
>>
>> There is also a minor correction in the reference implementation.
>>
>> http://www.erlang.org/eeps/eep-0044.html
>> https://github.com/erlang/eep/blob/master/eeps/eep-0044.md
>>
>> /Björn
>>
>> It is unclear if these changes will make it into 19.0.  Will any of EEP44
> be available?
>
> The is_deprecated/3 described by EEP44 seems unusable due to being focused
> on Erlang/OTP deprecated functions.  Could we instead implement it with
> usage of the module_info function so that anyone can easily use
> is_deprecated/3?  I don't think it requires checking the exports list (if
> someone is checking an unexported function, that is their problem that they
> should discover later in their source code).  I have an example
> implementation below:
>
> is_deprecated(Module, Function, Arity) ->
>     Attributes = Module:module_info(attributes),
>     lists:any(fun(Attribute) ->
>         case Attribute of
>             {deprecated, [_ | _] = Deprecated} ->
>                 lists:any(fun(Deprecate) ->
>                     case Deprecate of
>                         {Function, FunctionArity, _}
>                             when FunctionArity == Arity;
>                                  FunctionArity == '_' ->
>                             true;
>                         {Function, FunctionArity}
>                             when FunctionArity == Arity;
>                                  FunctionArity == '_' ->
>                             true;
>                         _ ->
>                             false
>                     end
>                 end, Deprecated);
>             _ ->
>                 false
>         end
>     end, Attributes).
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160602/e9776b24/attachment.htm>


More information about the erlang-questions mailing list