JuliaObjects / Accessors.jl

Update immutable data
Other
166 stars 14 forks source link

`obj` position in argument order #154

Open jariji opened 4 weeks ago

jariji commented 4 weeks ago

Higher-order functions like map(f, obj) usually put the data argument last. In Accessors, it's usually hof(obj, optic, val) or modify(f, obj, optic) where the data argument comes earlier, which I didn't expect. I'm interested what explains this decision?

jw3126 commented 4 weeks ago

In very early Setfield.jl commits the order was actually like you suggested. However: