3 ms·
Kotlin is nice, but setting up the build system can be a bit clunky, stack traces aren't quite as clear, it's more of a moving target, and important things like
by dehrmann 5y ago
Kotlin is nice, but setting up the build system can be a bit clunky, stack traces aren't quite as clear, it's more of a moving target, and important things like record classes are making it into Java. I tried it, but realized the code ended up being similar, just with less boilerplate, and switched back to Java. I feel like Scala went through a similar lifecycle. It looked amazing, supported lots of coding paradigms, but had a lousy build system. Once Java added lambdas, it was good enough, and Scala wasn't worth the hassle. Also, remember Groovy?
- k__ 5y agoI see. I had the impression the Java build system was rather convulted.
- rhacker 5y agoIt had a reputation for this in the days of ANT. However Maven (and to some degree gradle) kinda made it a non-issue.
- pjmlp 5y agoGradle is Ant for devs that never lived through Ant build hell.
- k__ 5y agoI heard that years ago, but I never worked with ANT. My "convulted build system" experiences all came from Maven and Gradle.
- Alupis 5y agoThen I dare say you do not know the meaning of "convoluted build system". Thousands, or tens of thousands of lines of semi-proprietary/non-standard XML is what made up ANT build scripts... mostly or entirely hand written for each and every project. Even small hobby projects had build scripts in the thousands of lines... there was no such thing as dependency management, and nothing came "for free". Every single thing had to be hand written into the script because ANT didn't have any inkling what you might want to do... build targets layered upon each other until rationalizing about what happens when during the build becomes a full time job all in it's own. Maven is amazing. With a few lines of XML you can successfully build nearly every project, manage all dependencies, etc. The trade-off? It's extremely opinionated in how your project is managed and how it's laid out. Worth while in most cases.
- dangets 5y agoI'm sold on Kotlin and have been working professionally in it for a few years (mixed Kotlin/Java projects server-side), so take my opinion for what it's worth. Integrating with Java's existing build systems (Gradle, Maven) was one of JetBrains initial design goals to avoid the separate ecosystem requirement that initially came with Scala. I admit building Kotlin has some quirks, notably around annotation processors - but overall it is very seamless. I am happy Java is adding new stuff (records, switch expressions, sealed classes), but I worry it is increasing overall language complexity vs. the fresh start that Kotlin was able to take. Supporting the legacy patterns in the language adds to the complexity any given Java developer is supposed to know. Overall I think the sane defaults and nudges towards the right patterns Kotlin pushes are a much bigger deal than just reducing boilerplate - though that is nice too.