scalalandio / chimney

Scala library for boilerplate-free, type-safe data transformations
https://chimney.readthedocs.io
Apache License 2.0
1.17k stars 94 forks source link

Rewrite Patchers as a special case of multiple case classes mapping #538

Open MateuszKubuszok opened 5 months ago

MateuszKubuszok commented 5 months ago

Once #115 is implemented, patching could become just a special case of patch.into[Obj].withFallbackValue(obj).transform:

This rewrite would allow Patchers to use every feature that Transformers have just by adapting the PatchingContext into TransformationContext.

While its possible to implement many existing feature requests with the current Patcher implementation, such additions would quite possible duplicate the implementation for Transformers and be scheduled for deletion from the start.