News for hackers. Stuff that matters.
Re:Java 21 Released by lolinder on Tuesday September 19, 2023 @11:56AM (#37571828)
In TypeScript at least, async-ness is encoded in the type system, because async/await is just syntactic sugar for Promise/then/catch.
Re:Java 21 Released by kaba0 on Tuesday September 19, 2023 @12:42PM (#37572565)
Well, JS is paired with a single-threaded execution model, so you only have concurrency to worry about. C#, Java has proper multithreading as well, that gives another dimension to the problem.
Re:Java 21 Released by lolinder on Tuesday September 19, 2023 @01:27PM (#37573231)
Kotlin has multithreading, and it also puts `suspend` in the type system.
Re:Java 21 Released by n2d4 on Tuesday September 19, 2023 @02:56PM (#37574590)
Some more examples: Rust, Python (with most/all? type checkers), C# all bake this into their type systems.
Re:Java 21 Released by vips7L on Tuesday September 19, 2023 @05:02PM (#37576589)
This is more due to the fact that Kotlin doesn’t control its backend and is designed to work with a language that already includes this model, js.