News for hackers. Stuff that matters.
Re:The Kotlin Foundation by balfirevic on Saturday February 13, 2021 @12:05PM (#26124782)
How did Java (as opposed to JVM) try to properly engineer solution to the problem coroutines were created to solve?
Re:The Kotlin Foundation by jsiepkes on Saturday February 13, 2021 @12:17PM (#26124875)
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 by balfirevic on Saturday February 13, 2021 @12:20PM (#26124907)
"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 by vips7L on Sunday February 14, 2021 @09:10AM (#26132510)
You're correct but you're forgetting that the jvm IS java. When it isn't trivial to solve at the language level they have the power to change the runtime.
Re:The Kotlin Foundation by jsiepkes on Monday February 15, 2021 @09:31AM (#26143049)
And on top of that Kotlin is now basically stuck with async-await forever. Removing async-await from the language and designing a more superior model the JVM now allows for with Loom is probably not going to happen. Adding a new model based on the new possibilities Loom provides will probably cause too much fragmentation (unless they come up with some really clever interop) so thats also unlikely.

Kotlin could be stuck here with a inferior co-routine model; Handicap of a headstart. Tough of course time will have to tell if the model Loom introduces in Java is going to be as great as it sounds.

Re:The Kotlin Foundation by chrisseaton on Saturday February 13, 2021 @12:19PM (#26124894)
> 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 by balfirevic on Saturday February 13, 2021 @12:26PM (#26124964)
Well, once that happened Kotlin also gets the solution.

It's rude and unfair to call out a language as "solving the problems with kludges" when they literally could not have done anything better.

Re:The Kotlin Foundation by chrisseaton on Saturday February 13, 2021 @12:30PM (#26125002)
Anyone can propose changes to the JVM. The Java people did. The Kotlin people didn't. And the Kotlin approach generates bad (irreducible) bytecode.
Re:The Kotlin Foundation by jdmichal on Monday February 15, 2021 @08:14AM (#26142402)
Yet the JVM had `invokedynamic` before it had any use in Java, specifically to support more dynamic languages.