jw3126 / Setfield.jl

Update deeply nested immutable structs.
Other
167 stars 17 forks source link

Implement show for typeof(@lens myfunction(_)) #85

Closed tkf closed 5 years ago

tkf commented 5 years ago

Re: https://github.com/jw3126/Setfield.jl/pull/77#issuecomment-530664735

  • Might also make sense to actually print this type as typeof(@lens myfunction(_))?

We can. But we need to be extremely careful in the implementation: JuliaLang/julia#29428

Oh wow I somehow never ran into that bug.

Actually, I noticed that the Julia "bug" has been fixed since Julia 1.1.0. So I think it's (relatively) safe to implement this.

(Just recording it as a possible improvement.)