Alexander Plavin
Alexander Plavin
The most convenient way is to define a setter for your `_nt` function first, and use it to forward set/insert/delete: ```julia Accessors.set(wnt::WrapNT, ::typeof(_nt), nt) = wrap_NT(nt) Accessors.set(wnt::WrapNT, lens::PropertyLens, val) =...
Indeed! We already have a convenience tool for that, but it doesn't apply to `PropertyLens` specifically: `@accessor myfunc(x) = x.myfield` enables set/insert/delete on `myfunc`. Maybe, `@accessor Base.getproperty(...) = ...` should...
First of all, thanks for thinking about extending Accessors to support mutations :) In my opinion (wdyt @jw3126?), this functionality is potentially in scope if can be done cleanly. Although...
What's the difference from SMTPClient.jl?
Sounds like a great reason to add a simpler user interface directly to SMTPClient :)
Thanks for trying it out @jariji! It's not just KeyedArrays that need special handling after this PR. For example, StaticArrays now lose their "staticness" completely: `set(SVector(1,2,3), reverse, 10:12)` now returns...
But the extension issue itself is simple: you define a new `set` function that doesn't overload `Accessors.set`.
Yeah I guess some checks can be added to a bunch of those methods...
This functionality definitely isn't currently available in Accessors. What would be your ideal API? And I'm personally curious what's your usecase :) Typically, one either has a number-indexed collection like...