7 ms·
One thing that Kotlin got going for it is the tooling. I mean, the creator of Kotlin creates some of the best programming tools out there so I'd imagine (withou
by commitpizza 4y ago
One thing that Kotlin got going for it is the tooling. I mean, the creator of Kotlin creates some of the best programming tools out there so I'd imagine (without actual experience of Kotlin) that it has great tooling.
Sometimes, the tooling is even more important than language features IMO. It makes developers move quicker, find bugs easier and so on. I like the idea of Kotlin, that it can compile to jvm bytecode, javascript and native.
So in essence, I can use the same language everywhere in the true meaning of the word.
- SpaghettiCthulu 4y agoHave you ever actually tried kotlin native? Compiling a "Hello World" program takes at least 5 seconds. That's absolutely absurd.
- kramerger 4y agoObviously kotlin has great tooling, coming from an IDE company. But I think the main strength of Kotlin is it being so damn developer-friendly compared to Java and Scala.
- commitpizza 4y agoDo you know of any good backend web frameworks for Kotlin? I would wish for something like FastAPI for python. Kotlin may actually be a great fit for a service I want to build and I hadn't really thought of it as an option until now.
- malsanton 4y agoJavalin https://javalin.io/ https://javalin.io/
- arein3 4y agoSpring Web MVC
- danieldisu 4y agoMicronaut, http4k
- xwowsersx 4y agoKtor https://ktor.io/ https://ktor.io/
- piaste 4y agoIf you want something old and battle-tested, Spring Boot works just fine in Kotlin. I found the extreme OO design kinda off-putting, but once I got over it I had a great time with it. KTor [0] is the 'native' web framework for Kotlin, and there's also a full-stack framework built around it that just hit version 1.0, KWeb [1]. [0] https://ktor.io https://ktor.io [1] https://kweb.io https://kweb.io
- commitpizza 4y agoWell I care more about simplicity and easy to develop in rather than battle-tested. Something like the Javalin or http4k would probably suit me the best. Of course, I have checked Ktor before, but I don't know if I particularly fancy the way they are structuring stuff. My main issue with the java ecosystem is that it's way to enterprisy for my taste. Everything is so unnecessary complex and hard to reason about, but I will take a good hard look at Kotlin before making my decision. The thing is that I am really interested in the native compilation that Kotlin offers that would be very beneficial for me and the only reason behind picking Python otherwise would be that it is a nice language and already installed on the linux environments it will run in. Basically I will have a big api and drop (preferrably) a single binary to some machines that will talk to the api. These machines will generally be outside of my control. I have looked a bit on Rust but it seems a bit too low level and hard to work with. I have looked at Deno because it can compile down to a binary but using javascript for this project seems like a bad choice. So I chose Python at first because it seemed easy to get going with, had great tooling and is already installed in the environments I will be dropping a script in.
- deleted 4y ago[deleted]
- listenallyall 4y agoHard to imagine anything less "enterprisy" than http4k. Zero dependencies, totally modular, and can easily produce a single binary that contains your web app and the web server itself. No Spring, no Tomcat, no app servers necessary. Install a reverse proxy in front to handle HTTPS. Same goes for ktor.
- treis 4y agoThat this has 5 different answers in 30 minutes is the problem I have with the Java/Kotlin ecosystem. There's just so much to figure out before you write a line of code.
- commitpizza 4y agoPersonally, I like that I have lots of options available. Compare it to .NET and it's "Microsoft way or the high way".
- pfarrell 4y agoAgreed. Having to the ability to make those decisions is a feature of Java development, not a bug. YMMV.
- hardware2win 4y agoBoth approaches have pros and cons I prefer having one decent tool thats used across almost all projects like asp net for web instead of 5 things with their own quirks and pros cons Its annoying to have to relearn boring things on company change Like orms, web frameworks, etc. When you need custom solutions then you gotta put effort anyway
- kaba0 4y agoWell, spring is pretty much exactly that, and is probably used more than all the other mentioned projects combined.
- dotdi 4y agoNobody mentioned this yet: Vert.x It has great Kotlin support, including Coroutines. I've introduced it into our team for a major rewrite and we are very happy about 18 months in.
- pfarrell 4y agoA few years ago, I used dropwizard for both a service that ran locally and for the cloud backend at a startup. Kotlin meshed very well and we never encountered any issues with either. Also just worked on a project that used micronaut which was less mature and not very intuitive, but did support Scala and Kotlin (a goal in that project).
- halfmatthalfcat 4y agoThere's been a lot of work in Scala land to improve tooling, see Mill as an SBT replacement.
- barrenko 4y agoIf only Kotlin had Scala's frameworks.
- nordsieck 4y ago> Sometimes, the tooling is even more important than language features IMO. It makes developers move quicker, find bugs easier and so on. I like the idea of Kotlin, that it can compile to jvm bytecode, javascript and native. The only thing I'd worry about is Java overtaking it. Do you remember Coffeescript? There was a point in time where it had impressive adoption, and quite a bit of buzz. But then Javascript added features, and all of a sudden the tooling burden associated with Coffeescript just didn't make sense any more. With Oracle's 6 month release schedule, that's a distinct possibility. Especially since Java can no longer rest on its laurels as a language (if Oracle doesn't want it to become Cobol 2).
- zendist 4y agoI don't know about that comparison. CoffeeScript transpiled to JavaScript- Kotlin doesn't transpile to Java, it compiles to JVM bytecode. So in a sense, from a tooling and compiler perspective, they're orthogonal products, similar (I guess) to C# and F# on the .NET CLR VM.
- ajkjk 4y agoWasn't it Typescript that made CoffeeScript obsolete? Not better JS
- tentacleuno 4y agoReally, it was a combination of both.
- Betelgeuse90 4y agoIIRC the main appeal of CoffeeScript was syntactic sugar like lambda expressions etc that were missing in ECMAScript 5. I think ECMAScript 6 made most of the appeal of CoffeeScript obsolete
- jgalt212 4y agoThe availability of lodash made us dump any ideas our shop had about widespread coffeescript use.
- barbariangrunge 4y agoThe biggest advantage of a statically typed language over a dynamic one is the tooling. Refactoring statically typed code, after working with JavaScript for a few years, feels like magic because the tools just make it work
- dima_vm 4y agoAs for me the greatest appeal of Kotlin is that it doesn't need its own tooling that bad, it feels like just syntactic sugar over Java. Both Scala and Kotlin can reuse Java tools, but with Scala it's awkward (and some tricky generics simply don't compile with Scala). E.g. if I need to parse something, I search for "how to parse that in Java", not "... in Kotlin".
- hocuspocus 4y ago> and some tricky generics simply don't compile with Scala What? Do you have any example that wasn't fixed years ago? Any non-trivial Scala app will consume dozens if not hundreds of Java libraries, without any issue.
- dima_vm 4y agoI filed an issue for Scala in 2009, that was answered like "sorry, this particular Java code cannot be used in Scala". In 2012 it still wasn't fixed. I cannot find the issue now, but I remember I was trying to use gae-mapreduce-java library (built on top of Hadoop interfaces). It couldn't compile with Scala.
- hocuspocus 4y agoThat's eons ago in Scala world. If you can, give it another try. I would assume such a bug was fixed in Scala 2.x given the prevalence of the language in the hadoop ecosystem and big data frameworks. Moreover Scala 3, was the opportunity to fix many previously-unfixable corner cases.
- deleted 4y ago[deleted]
- JAlexoid 4y ago> Sometimes, the tooling is even more important than language features IMO. That would be always. Tooling makes or breaks pretty much every language. Language itself is just a syntax that you write in.