Kotlin: Don’t repeat the same mistakes Java made


Here is a blog post I made in response to some overly cryptic API’s I encountered this morning:


I agree on most points. Only one remark. In the example it is definitely better to use statically typed methods if the class that provides this method is not intended to be extended. Otherwise it is possible to have different implementations and not to know which one provides which conversion. In this case it it sometimes easier to have a generic method instead multiple specific ones.