chimney
chimney copied to clipboard
Consider renaming Result to TransformResult
Since one would need to write something like Result.fromOption
, it can easily conflict with some other user-defined Result
types. I believe it's bad idea to use this generic name, would be nice to rename. I'd suggest TransformResult
.
In Scala you can apply renaming locally in your code-base already, without waiting for a proper release/fix in the library.
Just do:
import io.scalaland.chimney.partial.{Result => TransformResult}
Long term - happy to consider renaming in case more people find it useful.
I'd add that if you want to work with partials you might want to convert the errors to your own format which would require working with e.g. io.scalaland.chimney.partial.Error
, io.scalaland.chimney.partial.Path
and io.scalaland.chimney.partial.Errors
.
Renaming them all to something with Transformation*
prefix would be rather boilerplate'y, discouraging users from doing this. In our codebase we import io.scalaland.chimeny.partial
and use partial.Error
, partial.Result
, partial.Path
etc - without polluting io.scalaland.chimney
namespace with types that most user's wouldn't use anyway.
For now I'm closing this since importing package or rename on import works already.