4 ms·
I’ve used Kotlin on Server Side in production at a pretty significant scale and I think it’s the most underrated thing for people using JVM on servers. I recent
by maxpert 6y ago
I’ve used Kotlin on Server Side in production at a pretty significant scale and I think it’s the most underrated thing for people using JVM on servers. I recently had a podcast with one of Spring dev advocates (Josh Long) https://spring.io/blog/2021/02/11/a-bootiful-podcast-doordash-tech-lead-manager-zohaib-sibte-hassan-on-spring-boot-kotlin-grpc-and-more https://spring.io/blog/2021/02/11/a-bootiful-podcast-doordas... (shameless plug) and brought similar discussion to table. I will seriously urge folks to try it and hopefully foundation will bring more goodness!
- randompwd 6y agoHave only used Kotlin with Spring Boot for server side REST api and the resulting code was, a lot of the time, very un-digestable. Quite ugly to the eyes. Looking to give Kotlin another shot for non-Android API consumption and it seems like Ktor is a frontrunner. Looking at Spring WebClient to consume a JSON API makes my eyes hurt compared to other languages.
- dehrmann 6y ago> Quite ugly to the eyes. The companion object makes things like loggers ugly. Skipping parentheses for method calls that take lambdas can be nice, but all it does is safe a pair of parentheses, it makes for inconsistent syntax, and is pretty ugly when the method takes an arg. The lack of implicit upcasting is weird. The set/get sugar is nice, but it looks ugly when it's next to places where it doesn't work.
- randompwd 6y agoJust to update any1. I gave Ktor a shot. Tried to do something very basic - consume a URL. Was using Scratch files in IntelliJ. My god, the Ktor documentation is absurdly bad. Like horrifyingly bad. Google fu throws up results which do not have runnable code or explanation. Enough to put me off Ktor completely and continue my search. Maybe Jetbrains should drop web services framework development and focus on IDE cos Ktor is horrendous and scratch files could use some love. Absolutely terrible API aswell.
- holoduke 6y agoWe used it for 1 year. Using spring boot framework. Unfortunately we had to ditch it. Issues with multi annotation support. Problems with instant run / partial compile. Slower performance. This was about a year ago. Maybe things have been improved. But we also noted that many outstanding bugs were ignored by the main devs behind kotlin. Did not feel like a mature language. At least not now.
- brabel 6y agoWe've been using it since 1.0 and I agree with you that there's many rough edges... many projects may never run into them, but like you, we did have these issues you mention... slower performance by the compiler and IDE are very, very noticeable on a large Kotlin project (at runtime, we haven't had many issues - there's only a few cases Kotlin is slower than Java, but you can keep those in mind and avoid them when necessary[1])... one more issue is Dokka (the equivalent to Javadocs for Kotlin). It's still in alpha and it's pretty terrible, if I may say... it generates documentation that requires lots of JS libraries to run, which is just ridiculous. We ended up writing the documentation conversion ourselves instead of using Dokka (this was actually for an Android project - because we hadn't needed to publish docs for backend Kotlin before). That said: we still enjoy using Kotlin, I just wouldn't ditch Java for it if I had to pick one. [1] https://sites.google.com/a/athaydes.com/renato-athaydes/posts/kotlinshiddencosts-benchmarks https://sites.google.com/a/athaydes.com/renato-athaydes/post...
- maxpert 6y agoWhat version of springboot you were on?