Re:Java Is in Decline, and There's Data to Prove It
by andix on Sunday January 01, 2023 @09:17AM
(#34206399)
Async/await doesn’t change anything there. It just makes it easier to deal with.
[ Parent
| on HN ]
Re:Java Is in Decline, and There's Data to Prove It
by justoreply on Sunday January 01, 2023 @10:34AM
(#34207088)
With the new thread model in java (project Loom) you don't need function coloring
Re:Java Is in Decline, and There's Data to Prove It
by andix on Monday January 02, 2023 @10:04AM
(#34218608)
I don't know the details. But a synchronous function returns a value and an async function returns something promise-like (it completes at some point and returns a value or an error).
You can always call something async synchronously (by waiting for finishing). Or something synchronous in an async way (by putting it onto another thread). But there is no way to completely remove this fact from the eyes of the programmer. async/await is one of the ways to make it easier to read or write.