[erlang-questions] type specification of functions with same signature

Karlo Kuna kuna.prime@REDACTED
Sun Oct 23 00:43:13 CEST 2016


sure dialyzer will report error but callback functions are just one
motivation, for me the first example is far more important
as it reduces spec duplication which is annoying and not very expressive
IMHO.

On Sun, Oct 23, 2016 at 12:34 AM, Kenneth Lakin <kennethlakin@REDACTED>
wrote:

> On 10/22/2016 11:48 AM, Karlo Kuna wrote:
> > is there way to achieve this in current erlang
>
> This doesn't feel like a straightforward way to achieve it, but
> functions that implement behavior callbacks appear to have the same
> specification as the behavior callback.
>
> dialyzer reports when the implemented callback deviates from the
> callback definition, and you don't need to annotate the implementing
> function(s) with "-spec" lines.
>
>
>
> _______________________________________________
> 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/20161023/7224409c/attachment.htm>


More information about the erlang-questions mailing list