Live data from Hacker News

The Kotlin Foundation

kotlinlang.org

61–70 of 236 posts

Re: The Kotlin Foundation

#61
post #41

A question for HN - I like Java a lot for the ‘http API talking to SQL database’ usecase, with my goto for that being dropwizard or spring boot. I’ve only ever looked at Kotlin code in blogposts, haven’t ever actually used it. I’m probably at least a few years behind on its feature set, but I am aware of all the great features Java has added in that timeframe, many no doubt inspired by Kotlin! Would you advise me to…

I work in a fintech company, most of our backend is in Kotlin with "legacy" functionality in Java. Can't think of a single developer that would choose Java over Kotlin.

I'd choose Java over Kotlin. The benefits of Kotlin seem minor - mostly syntactic sugar - and the tooling is more limited than Java. They seem to solve problems with kludges (like their coroutines are really just state machines in JVM bytecode, which creates issues like irreducible control-flow) rather than properly engineering solutions like Java try to do.

Re: The Kotlin Foundation

#62
post #32

Earlier quoted context omitted.

You have to consider not only the language but what the team working on it will look like. It is still a bit hard to find server-side kotlin devs. On the other hand in my experience, Java devs pick up Kotlin really quickly (as do Python devs interestingly whereas they struggled with Java). I'm a huge proponent of Kotlin on the server side, less on frontend (JS) side. If you go with Kotlin and Spring Boot, Micronaut o…

Strictly imo, using Kotlin with Spring Boot defeats the purpose if you're trying to get away from traditional Java web frameworks (didn't think I needed to spell this out due to the next sentence, but HN gonna HN). Kotlin is a chance to get away from the cruft and annotation magic of traditional Java. I use Ktor and it's everything you need for a modern API (and can be deployed as a WAR if that's why you want Spring…

It depends on your needs I guess. Not all API can be handled by just a few classes. If your plan is to maake a microservice that expose a single value, yes spring boot is likely overkill. But when you have complex models with runtime configuration and profiles and so on... Maybe we need to specify what we are really talking about when we say API. For some it just means a partial implementation of REST.

Re: The Kotlin Foundation

#63

Earlier quoted context omitted.

well Google's using all three in different ways... and another trend on prog. langs: they're becoming more and more similar feature-wise (eg. pattern matching)

> well Google's using all three in different ways... So that justifies giving them a seat at the board of directors and not just a sponsorship? Apple and Facebook both use Rust but I don't see anything about them being on the board (at least Facebook for now), the least I expect is sponsorship.

I’m curious, what does Apple use Rust for?

Re: The Kotlin Foundation

#64
post #41

Earlier quoted context omitted.

I work in a fintech company, most of our backend is in Kotlin with "legacy" functionality in Java. Can't think of a single developer that would choose Java over Kotlin.

I'd choose Java over Kotlin. The benefits of Kotlin seem minor - mostly syntactic sugar - and the tooling is more limited than Java. They seem to solve problems with kludges (like their coroutines are really just state machines in JVM bytecode, which creates issues like irreducible control-flow) rather than properly engineering solutions like Java try to do.

Just sharing my experience, to each his own.

Re: The Kotlin Foundation

#65
post #41

Earlier quoted context omitted.

I work in a fintech company, most of our backend is in Kotlin with "legacy" functionality in Java. Can't think of a single developer that would choose Java over Kotlin.

I'd choose Java over Kotlin. The benefits of Kotlin seem minor - mostly syntactic sugar - and the tooling is more limited than Java. They seem to solve problems with kludges (like their coroutines are really just state machines in JVM bytecode, which creates issues like irreducible control-flow) rather than properly engineering solutions like Java try to do.

How did Java (as opposed to JVM) try to properly engineer solution to the problem coroutines were created to solve?

Re: The Kotlin Foundation

#66

A question for HN - I like Java a lot for the ‘http API talking to SQL database’ usecase, with my goto for that being dropwizard or spring boot. I’ve only ever looked at Kotlin code in blogposts, haven’t ever actually used it. I’m probably at least a few years behind on its feature set, but I am aware of all the great features Java has added in that timeframe, many no doubt inspired by Kotlin! Would you advise me to…

I recommend having a look at http4k as an alternative to Ktor and Spring as well.

Re: The Kotlin Foundation

#67

A question for HN - I like Java a lot for the ‘http API talking to SQL database’ usecase, with my goto for that being dropwizard or spring boot. I’ve only ever looked at Kotlin code in blogposts, haven’t ever actually used it. I’m probably at least a few years behind on its feature set, but I am aware of all the great features Java has added in that timeframe, many no doubt inspired by Kotlin! Would you advise me to…

Kotlin never appealed to backend developers (based on job ads, new open-source projects in the domain). Data pipelines, concurrency and streaming are becoming more and more part of what a backend dev should know. Instead, I've noticed that Scala is used in many systems where Java historically was less ergonomic for the task. Spark, Delta, Deequ, Scio, Finagle, Flink, Kafka, the Typelevel & ZIO ecosystems, Akka are so…

I think a big part of the appeal of Kotlin was that Scala was impractical for use on Android so Kotlin slid in as "the missing pieces" of Java.

Re: The Kotlin Foundation

#68

A question for HN - I like Java a lot for the ‘http API talking to SQL database’ usecase, with my goto for that being dropwizard or spring boot. I’ve only ever looked at Kotlin code in blogposts, haven’t ever actually used it. I’m probably at least a few years behind on its feature set, but I am aware of all the great features Java has added in that timeframe, many no doubt inspired by Kotlin! Would you advise me to…

I would, main reason being calling Java from Kotlin is seamless. It makes most things easier by being expression oriented and having less verbose yet familiar syntax also saner type system. So you can just use it as better Java.

If you want to go further you can also use other nice features like suspend functions, hot/cold channels, sealed classes.

Re: The Kotlin Foundation

#69

Earlier quoted context omitted.

> But Google is one of the few companies that gives back to projects they use. Apple gives back to open source projects. Isn't Swift open source as well as LLVM and Webkit? Makes sense because they made them and a long time user of them.

WebKit has to be open source because it's a KHTML fork.

This isn't actually true. KHTML is LGPL 2.0, so you can release source code for the pieces you modified and binary blobs for the rest. WebKit proper (as opposed to WebCore, which was based on KHTML, and JavaScriptCore, which was based on KJS) was originally not open source.

Re: The Kotlin Foundation

#70
post #41

Earlier quoted context omitted.

I work in a fintech company, most of our backend is in Kotlin with "legacy" functionality in Java. Can't think of a single developer that would choose Java over Kotlin.

I'd choose Java over Kotlin. The benefits of Kotlin seem minor - mostly syntactic sugar - and the tooling is more limited than Java. They seem to solve problems with kludges (like their coroutines are really just state machines in JVM bytecode, which creates issues like irreducible control-flow) rather than properly engineering solutions like Java try to do.

But... When Java gets "properly engineered solution" for async code... Kotlin got it as well!
Post reply on HN