-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modifyAll and setTo #27
Comments
Wouldn't a chain:
be more readable? |
Yes you're right it's more readable and safer that way. I was just wondering if it would be more efficient if it was done in one call. |
Probably, a bit, but then if modifying a case class once or three times makes a difference, maybe it's not a good idea to use (immutable) case classes anyway ;) |
That's true. We're making heavy use of this pattern but I can always refactor it locally if there's a hot point in the code.
|
Is it possible to use 'modifyAll' and something like 'setTo' to set multiple fields without doing duplicate copy operations? In the example code I only see modifyAll being used with 'using'.
Ideally setTo would take a tuple that matches the order of arguments to modifyAll
The text was updated successfully, but these errors were encountered: