ANN: Setfield.jl Yet another package for working with immutables

Okay I think we can do that. We need ways to hook into @set. I think

@set obj.x = 1.0

should call setproperty(b, Val{:x},1.0) and then the user could overload setproperty to get any kind of interesting behaviour. The default implementation of setproperty should be something like

  1. destructure obj into properties
  2. manipulate properties
  3. construct new_obj from typeof(obj) and properties

Each step should be overloadable. 3) is where you could hook in your

Reconstructables.constructor_of(::Type{<: B{T}}) where T = B{T}

What do you think?