-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
add automatic field renaming according to custom function or popular conventions #89
Comments
The problem with function provided by the user is that either (1) we sacrifice compile-time type safety and run the function in runtime allowing for runtime exceptions, or (2) we must be somehow able to run this function in compile time. From my perspective (1) is no-go zone as it would diminish strong guarantees provided by the library. When it comes to (2), it doesn't either seem to be technically possible as it would require taking a program that is being compiled and run it during the compilation. What we could do instead is to provide builtin support for
I'm keen to accept PRs that provides support for such conventions. |
Added in 1.0.0-M3 |
It might be useful to consider adding a method that automatically renames all fields of a class according to provided
f: String => String
, something along these lines:If running a user-provided function in compile time turns out to be impossible or we deem it too dangerous, perhaps we could support transitions between the common case styles?
The text was updated successfully, but these errors were encountered: