News for hackers. Stuff that matters.
Re:.NET 5.0 by jiggawatts on Tuesday November 10, 2020 @03:19PM (#25051302)
> [Async has] Huge disadvantages with absolutely zero performance gains for 95% of programmers.

One curious thing is that Java has elected to use lightweight threads instead of async methods: https://www.javacodegeeks.com/2019/12/project-loom.html

Their arguments are compelling:

- Works with existing debuggers and debugging techniques.

- Stack traces aren't polluted with irrelevant garbage.

- Doesn't create method apartheid, where async and non-async can't "mix".

- Doesn't force library authors to "buy into" the async model.

Re:.NET 5.0 by int_19h on Tuesday November 10, 2020 @03:27PM (#25051440)
- Cannot interop with other languages/VMs that do async differently.

The nice thing about promise-based async is that it's very easy to map to straight C ABI callbacks, which means that it can be fully cross-language. Green threads are runtime-specific.

Re:.NET 5.0 by Ironlink on Tuesday November 10, 2020 @03:38PM (#25051585)
"Cannot" seems a bit harsh. CompletableFuture isn't going away, and is made for callback situations.

With green threads being "free" (you can have millions), it might be reasonable to just block your green thread until the callback arrives.