Hey Hylke!

In the mean time you could parse the value contained in the @callback
attribute and generate a list of all the functions :)

Cheers,
Louis

On Thu, 13 Sep 2018 at 15:04 Hylke Alons <[email protected]> wrote:

> Hello!
>
> Sometimes I want to make all callbacks in a behaviour optional. Right now
> I need to specify everything manually.
>
> My proposal would be something consistent to defoverridable, in which you
> can make all methods overridable by using the module.
>
> So instead of
> defmodule SomeBehaviour do
>  @callback x(a, b) :: boolean
>  @callback c(a, b) :: binary
>
>  @optional_callbacks x: 2, c: 2
> end
>
>
> defmodule SomeBehaviour do
>  @callback x(a, b) :: boolean
>  @callback c(a, b) :: binary
>
>  @optional_callbacks SomeBehaviour
> end
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/9150632a-e2a1-46c8-b885-b3fd297a2cf4%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/9150632a-e2a1-46c8-b885-b3fd297a2cf4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CABu8xFBk2jWS3J7weNP%3DchgNZiMUdJ6NwVBz6AvgasfAjVM6rQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to