4 ms·
Better structured, easier to debug, and the tooling exists to incrementally refactor in a relatively safe way. There are also migration paths to better worlds.
by repolfx 8y ago
Better structured, easier to debug, and the tooling exists to incrementally refactor in a relatively safe way. There are also migration paths to better worlds. IntelliJ can auto-rewrite Java into Kotlin, preserving comments and formatting along the way, and even detecting common Java idioms that have better Kotlin equivalents and rewriting them too. So, not only can you migrate to better app containers, database engines, upgrade your garbage collector and compilers etc, but also even switch to a much more modern language nearly pain free.
- tcbawo 8y agoRegardless of whether Kotlin is considered a better world than Java, I'm skeptical that this sort of automatic translation adds significant value.
- einarfd 8y agoI'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.