Closed Odonno closed 4 years ago
Whilst this is in theory achievable, the only way I can think to do this would necessitate a lot of reflection use and so would be slow. I'd question whether it's worth it therefore when pattern-based with
expressions are currently pencilled in for C# 8.
@DavidArno Indeed, it would use reflection to create a new Immutable object and detect properties to overwrite. I can start with a PR until we have C# 8.
PR's are always welcome 😀
Bit slow on the uptake here, but I have just realised that because this feature requires System.Runtime
it breaks the netstandard 1.0
version of SuccincT. I could update that to netstandard 1.5
, but that would be a breaking change.
I am therefore pulling this feature from the v3.1 release and will reschedule it for the v4.0 release (which is allowed to make such breaking changes).
Apologies for the last minute change of plan here.
Good to know. I will have some time to make some adjustments on the feature so.
@DavidArno For information, I have made the wiki page for Copy/With functions https://github.com/DavidArno/SuccincT/wiki/Copy---With
Released with v4.
It would be interesting to add immutable syntax using the
with
keyword from F#. Here is a proposal :