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
natpryce
03/13/2019, 8:20 AM
What would be the benefit of keeping them as methods instead of property accessors?
t
thana
03/13/2019, 9:12 AM
the benefit would be, that API docs for java are stil lreadible from a kotlin point of view
thana
03/13/2019, 9:13 AM
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
thana
03/13/2019, 9:14 AM
and also very surprising the first time you come across this "feature"
thana
03/13/2019, 9:15 AM
and conversley we should ask: whats the benefit in creating a virtual property?
n
natpryce
03/13/2019, 9:21 AM
Are you talking about interop? Or the Java to Kotlin source conversion?
a
Alexey Belkov [JB]
03/14/2019, 8:33 AM
Please consider reporting an issue at http://kotl.in/issue with a problematic example of code. Thanks!