3 ms·
I've been using Intellij's Java to Kotlin conversion a bit lately, and the code it spits out is fairly decent Kotlin, and with a pass through on nullability and
by einarfd 8y ago
I've been using Intellij's Java to Kotlin conversion a bit lately, and the code it spits out is fairly decent Kotlin, and with a pass through on nullability and switching out Java types with native Kotlin types afterwards. It gets just as good as it would get if I hand translated my self, but it takes a lot less time.
I suspect that part of the reason that this works well, is that Java and Kotlin isn't that dissimilar. Doing automated conversion between Java and Scheme for example, would be a lot harder to get right.