-
Notifications
You must be signed in to change notification settings - Fork 22
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
Clarification of fieldvalues, API and related packages #53
Comments
You are touching an awkward point here. I think there is currently no precise definition of |
I really like the lightweight approach of ConstructionBase - I have a need for something like this to improve ForwardDiffPullbacks.jl. But I do need both directions (decomposition and reconstruction) and if people specialize We have several things in this direction scattered across the ecosystem at the moment (Functors.jl seems closely related but incompatible, for example). It would be so nice so have a consensus (analog to ChainRulesCore, in a way) for de/reconstruction that can power things like generic flatten/unflatten, and so on. Question is, what should |
I am not sure, it depends on the job description of Privacy and fancy semantics are the job of |
That's what I meant - is
Isn't that what Adapt.jl is for? |
I don't mean to say that having a tool that can reconstruct values from their low-level field values isn't very important as well (@piever, maybe StructArrays.jl could profit from |
Yes there is an awkward tension between |
@rafaqz so should we state in the docs that |
I guess we should, althoughmaybe warning not to actually write it that way. |
So built-in |
I wonder if Functors.jl could use |
Yes, |
And yes Functors.jl could totally use |
@mcabbott, could you see that happening? |
Thanks for the ping. Yes, StructArrays could potentially use this as well. There may be a little bit of awkwardness, in that StructArrays allows to customize the tuple of fieldvalues (defaults to the tuple of |
According to the docs the behavior of
constructorof
should beobj == constructorof(obj)(fieldvalues(obj)...)
. But when specializingconstructorof
, whichfieldvalues
function should be targeted - is itIterTools.fieldvalues
?The text was updated successfully, but these errors were encountered: