Hello! I love kotlin but i have one pain point tha...
# announcements
u
Hello! I love kotlin but i have one pain point that I would like to talk to you guys about. If you define a var/val in a constructor and then want to add a getter/setter to that (not as a function/method but as a property). There is as far as i am aware no easy way to do that. As an example:
Copy code
data class Data(var value) { // Here i want to add a setter for value. }
I know that you can change the name of value to something like _value but this sort of messes up stuff if you want to have named arguments in the constructor and such.