-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Hi,
One thing that can help with compatibility elsewhere is to hint your lenses and so-on are functions, by directly subtyping Function.
For example the code at https://github.com/JuliaObjects/Accessors.jl/blob/master/src/optics.jl#L345 could become:
struct PropertyLens{fieldname} <: Function
end This came up in SplitApplyCombine, which (unfortunately) is currently using Base.Callable in a few cases (although I wish the API were factored so it were obvious which terms must be functions rather than collections), here.
CC @aplavin
Metadata
Metadata
Assignees
Labels
No labels