[erlang-questions] Specs for optional callbacks (try 2)
Loïc Hoguin
essen@REDACTED
Wed Sep 24 18:52:27 CEST 2014
Hi,
I didn't get any reply on my previous question almost 2 years ago here:
http://erlang.org/pipermail/erlang-questions/2013-January/071763.html
So let me ask again, is there any plans for adding something like
-optional_callback that would do the same as -callback except it would
not require the callback to be defined? Basically Dialyzer would use it,
and the compiler wouldn't fail if the callback is missing.
As it stands now I am about to remove most -behavior in Cowboy because
they're starting to make little sense because most callbacks become
optional. The simplest handler type will have 3 possible callbacks, 2
being optional. The most complex handler type already has 20+ callbacks
with only 1 required.
Thanks for any reply.
--
Loïc Hoguin
http://ninenines.eu
More information about the erlang-questions
mailing list