Is anyone else annoyed at the fact that the java t...
# intellij
p
Is anyone else annoyed at the fact that the java to kotlin conversor creates virtual properties out of all functions which have a get/set prefix? Just to give you an example, in applications such as Spring backends (bean methods) you may want to keep them as functions. All in all, I consider the decision of converting functions into virtual properties shouldn't be taken automatically.
2
n
What would be the benefit of keeping them as methods instead of property accessors?
t
the benefit would be, that API docs for java are stil lreadible from a kotlin point of view
you always have to apply your knowledge, that something that as a
get
or
set
prefix might also be a property and then make an educated guess what its name will be. i agree, that this step is annoying
and also very surprising the first time you come across this "feature"
and conversley we should ask: whats the benefit in creating a virtual property?
n
Are you talking about interop? Or the Java to Kotlin source conversion?
a
Please consider reporting an issue at http://kotl.in/issue with a problematic example of code. Thanks!