4 ms·
I initially used Kotlin for a project at work, and I would agree that it is underwhelming. Pivotal had announced official support for Kotlin with Spring Boot, w
by jsmith0295 10y ago
I initially used Kotlin for a project at work, and I would agree that it is underwhelming. Pivotal had announced official support for Kotlin with Spring Boot, which is what motivated me to give it a try. However, there was no support for the @Transactional annotation in Kotlin at the time, so I ended up writing a decent amount of Java anyways. Then there was a compatibility issue with one of our internal libraries, and I had to rewrite all of the controllers in Java. By the time the project was finished, the majority of the code was in Java, and I hadn't really gotten any benefit out of the Kotlin, so I decided to just use Lombok and replace all of the Kotlin code with Java. My builds got about 3 times faster after that because Kotlin seems to have performance issues with Gradle.
The 1.1 release is promising many features that make me want to revisit it, though: https://blog.jetbrains.com/kotlin/2016/04/kotlin-post-1-0-roadmap/ https://blog.jetbrains.com/kotlin/2016/04/kotlin-post-1-0-ro...
- vbezhenar 10y agoAs of 1.0 Kotlin has solid Java compatibility, @Transactional definitely shouldn't be an issue. What features are compelling for you in 1.1? They are nice, but generally just a nice sugar. I don't really miss any of those. I suggest you to try it now, if you have a chance.
- jsmith0295 10y agoThe @Transactional problem was fixed, I shouldn't have left that out. I had first tried to do this pretty much immediately after the 1.0 release. Async/await is cool, but it's really the idea of adding channels and coroutines that I'm a fan of. We've also generally stopped using that library that didn't work with Kotlin controllers for any new projects, so Kotlin is definitely something I look forward to using again.