https://kotlinlang.org logo
a

Ahmed Mourad

07/03/2020, 10:08 PM
Exceptions vs Result types, value-based classes and NoCopy. https://www.reddit.com/r/Kotlin/comments/hjoyxx/nocopy_compiler_plugin_for_kotlin/ https://www.reddit.com/r/androiddev/comments/hj3yq8/nocopy_compiler_plugin_for_kotlin/ Some interesting discussions were conducted here :)
t

thanksforallthefish

07/06/2020, 6:14 AM
we are having the same discussion at work and I don’t get it. we are not kids, and even to kids you can teach to use/do things with moderation and where it matters. reflection can also be misused, and kotlin is making it quite convenient (granted, not as much as
copy
), but that is fine. Am I having too much faith in developers doing the right thing?
👍 1
a

Ahmed Mourad

07/06/2020, 9:53 AM
I see your point, but given the number of times I made silly mistakes that took some time to find, I'd move any responsibilities I can to the compiler, it also helps me maintain and reason about the project, It's like trusting the compiler vs trusting the humans. I agree about reflection, which's why I never touch it directly, or at least I didn't have to, yet. As an example, I tend to stay away from Python as much as I can, because I don't trust myself around it and there's no compiler to tell me when I do something stupid.