Live data from Hacker News

The Kotlin Foundation

kotlinlang.org

71–80 of 236 posts

Re: The Kotlin Foundation

#71
post #62

Earlier quoted context omitted.

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.

Who said anything about a few classes?

How does using Ktor preclude one from using anything you just described?

Lol just using Koin alone would bring every thing you just described, with the added benefit of not delving into XML files.

Really some people are just married to the mentality of "If it's not on the feature list, I guess you can't do it". I believe in using focused tools that excel at specific things. Ktor lets you do that.

Re: The Kotlin Foundation

#72

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.

We get it... you hate google

Re: The Kotlin Foundation

#73

Earlier quoted context omitted.

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?

Project Loom: https://openjdk.java.net/projects/loom/

The view being that async-await leads to a "What color is your function" problem ( https://journal.stuffwithstuff.com/2015/02/01/what-color-is-... ).

Re: The Kotlin Foundation

#74
post #35
post #31

Interesting to watch Kotlin develop. It came in and filled the niche that i always thought Scala would fill. I’ve been doing mostly Swift for the past several years, and i love it. Scala 3 looks interesting but it seems to be moving slowly. I look forward to having another Java option if I ever get back to that platform. Java was cool in 1998 but after Swift, I’ll need something nicer on the JVM

Coming from Swift, you will not be lost in Kotlin.

Seconding this only thing that Kotlin does not give you is Associated Objects.

You unfortunately cannot add new (stored) properties to existing types like you can in Swift.

Re: The Kotlin Foundation

#75

Earlier quoted context omitted.

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…

I thought ktor was a toy, but apparently YouTrack (JetBrains' alternative to Jira) is built on top of it: https://www.jetbrains.com/help/youtrack/standalone/Third-Par...

It's not surprising that the company behind the language would promote use of tools native to that language. They have the incentive to fix the tools if bugs are found to make the ecosystem more attractive. Whether it's a good choice for your use case - you need to evaluate it.

Re: The Kotlin Foundation

#76
post #60

Earlier quoted context omitted.

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…

My old team used Spring and Kotlin and it was a really productive combination. Spring isn't standing still. They have first class support for Kotlin and rewriting their framework to support the graalvm.

Spring is not standing still, and I'm not trying to claim it is, but there's still a fair bit of ceremony around a lot of features

That's not necessarily a bad thing, but usually people who are giving the JVM a "second chance" via Kotlin were initially turned off by that ceremony

-

So when someone asks me "What should framework should I try for Kotlin web services?" my answer is usually Ktor.

Because if they had to ask me, they probably aren't going to be that in love with Spring Boot (people coming from Java from example, are usually just going to default to Spring Boot)

Re: The Kotlin Foundation

#77

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…

Kotlin is taking off on the backend. It took a little longer than some people might have hoped but all the big boys are doing backend development in Kotlin now. Square/Netflix/Uber/Twitter/AirBnB all traditionally Java houses have adopted Kotlin in one way or another.

Scala on the other hand is facing a decline. Less so in Big Data where it is still doing well but I find increasingly it's not being chosen for new backend development.

Re: The Kotlin Foundation

#78

Earlier quoted context omitted.

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?

> How did Java (as opposed to JVM)

Well that’s the point - they solved it in the JVM not as a kludge of bytecode.

Re: The Kotlin Foundation

#79

Earlier quoted context omitted.

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

Project Loom: https://openjdk.java.net/projects/loom/ The view being that async-await leads to a "What color is your function" problem ( https://journal.stuffwithstuff.com/2015/02/01/what-color-is-... ).

"As opposed to JVM"

You don't have to convince me that green threads are far superior to async-await - I already believe that.

But that's not something Kotlin (nor Java, on the language level) could have solved.

Re: The Kotlin Foundation

#80

Earlier quoted context omitted.

> 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?

They were hiring for their storage and networking groups, but that’s all we know.
Post reply on HN