-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Functors.jl? #439
Comments
I know you moved this from the Functors tracker, but if anything the dependency should probably be the other way around (or handled by a glue package). Namely, we might want to add |
This particular case is one of my examples for why we need conditional dependencies. JuliaLang/Pkg.jl#1285 (comment) In short: We have no dependencies except Compat.jl (which is basically a stdlib at this point.) 10 packages directly depend on Functors.jl and 80 indirectly. It also doesn't hugely make sense. Ideally, Functors.jl would workout how to have implicit functors on things that overload But failing that |
And the Functors.jl authors will probably argue that they have no depencency except MacroTools, which is also basically unavoidable as soon as you install enough packages to make ChainRulesCore useful. :-) Both packages are very lightweight and naturally want to remain so - it's a conundrum ...
Maybe I'm misunderstanding something - isn't the fact that you don't need to flatten the main point of Functors? Hm, what if Functors could be made even more lightweigh? DhairyaLGandhi , would it be conceivable to have a FunctorsBase package that only defines |
Even if Functors.jl was more lightweight we still would not add it. Lightweightness, number of dependencies (especially since almost all Functors.jl dependents already depend on ChainRulesCore), and conceptualness. I am sorry that this is a hard problem. |
oops didn't mean to actually close this. (edit: arg, why are those buttons right next to each other) |
Well, I just had a feeling that I think think what Functors does (independent of it's maturity) may be, in a way, more fundamental than |
I'm not sure why Functors has a dep on MacroTools, opened FluxML/Functors.jl#22 to track that. The biggest question remains one of stability. I don't think we're anywhere close to settling on a final API for Functors, and thus 1.0 will probably take a while to materialize. RE convergence, I'm also not sure what Functors brings to ChainRulesCore that isn't covered by
It may be that there is no good abstraction for addressing all of these goals satisfactorily, but we certainly won't know until we try :) |
I could be very handy if the tangent types would support
Functors.functor
- see FluxML/Functors.jl#20.Would Functors.jl be lightweight enough to be acceptable as a dependency for CRC?
The text was updated successfully, but these errors were encountered: