kotlin-style-guide
kotlin-style-guide copied to clipboard
Add a note on overloads behavior
trafficstars
In the process of language evolution, subtle changes may happen to overload resolution algorithms, so it's advisable to design one's overloads so that they all "do the same thing", and the change in behavior is not so huge if a different overload is chosen by the compiler.
This is quite a vague recommendation. Can you provide an example of a set of overloads that doesn't follow this recommendation, and how it can be changed to start following it?