top | item 46122200

(no title)

newpavlov | 3 months ago

In my (Rust-colored) opinion, the async keyword has two main problems:

1) It tracks code property which is usually omitted in sync code (i.e. most languages do not mark functions with "does IO"). Why IO is more important than "may panic", "uses bounded stack", "may perform allocations", etc.?

2) It implements an ad-hoc problem-specific effect system with various warts. And working around those warts requires re-implementation of half of the language.

discuss

order

echelon|3 months ago

> Why IO is more important than "may panic", "uses bounded stack", "may perform allocations", etc.?

Rust could use these markers as well.

newpavlov|3 months ago

I agree. But it should be done with a proper effect system, not a pile of ad hoc hacks built on abuse of the type system.