Thanks for your reply Louis! 

What would that look like? 

On Thursday, 13 September 2018 18:25:50 UTC+2, Louis Pop wrote:
>
> 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] 
> <javascript:>> 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] <javascript:>.
>> 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/d958c0b6-fae8-42e9-bece-e573b7331a86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to