You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2019. It is now read-only.
Is it possible to define (not just declare) functions in @traitdef so that all @traitimpls would have that function defined implicitly (cf. e.g. https://github.com/jasonmorton/Typeclass.jl), and, if not, how hard would it be to implement this?
It would allow to avoid a great deal of repetition in cases where a large function has to be included in each @traitimpl, with only argument types being different.
The text was updated successfully, but these errors were encountered:
However, that means that f is defined for all types. It would be nice, as you say, to have a default defined for a implemented type. I hope to add this but cannot give you any time-frame.
Is it possible to define (not just declare) functions in
@traitdef
so that all@traitimpl
s would have that function defined implicitly (cf. e.g. https://github.com/jasonmorton/Typeclass.jl), and, if not, how hard would it be to implement this?It would allow to avoid a great deal of repetition in cases where a large function has to be included in each
@traitimpl
, with only argument types being different.The text was updated successfully, but these errors were encountered: