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
Thanks for the invite, I am happy to co-maintain it. What do you mean by
Do you want to use it from Setfield?
As I understand, the operations in CompositionBase.jl are all derived from ∘? So they automatically work on lenses without any extra code needed in Setfield.jl?
There is one subtle point. Setfield.compose() is a lense, while CompositionBase.compose() throws an error. Its a bit awkward. We could rename Setfield.compose into e.g. lenscompose and reexport CompositionBase if you like.
Ah, good point. Well, if nobody asked to export this function, I think it's OK to keep it like this. Though probably a super careful approach is to use lenscompose so that it is possible to re-export CompositionsBase.compose from the top-level namespace at some point.
Activity
jw3126 commentedon May 30, 2020
Thanks for the invite, I am happy to co-maintain it. What do you mean by
As I understand, the operations in
CompositionBase.jlare all derived from∘? So they automatically work on lenses without any extra code needed in Setfield.jl?tkf commentedon May 30, 2020
Ah, I forgot that Setfield.jl didn't export
compose.So, you are right, there is no need for Setfield.jl to import CompositionsBase.jl (unless you want to re-export
composeetc.)jw3126 commentedon May 30, 2020
There is one subtle point.
Setfield.compose()is a lense, whileCompositionBase.compose()throws an error. Its a bit awkward. We could renameSetfield.composeinto e.g.lenscomposeand reexportCompositionBaseif you like.tkf commentedon May 30, 2020
Ah, good point. Well, if nobody asked to export this function, I think it's OK to keep it like this. Though probably a super careful approach is to use
lenscomposeso that it is possible to re-exportCompositionsBase.composefrom the top-level namespace at some point.