News for hackers. Stuff that matters.
Re:Swift is a more convenient Rust by the_duke on Friday September 06, 2024 @07:19AM (#41465066)
Funnily enough Rust supports exactly that pretty well with async.

An `async {}` block is not evaluated, but converted into a generator/state machine that lives on the stack, and that has to be advanced by calling a poll method. You can move it to the heap , but that does not happen automatically.

Sharing of values is obviously much more awkward due to mutability and no automatic cloning though.

Re:Swift is a more convenient Rust by benreesman on Friday September 06, 2024 @07:32AM (#41465149)
I know how it works though I remain unconvinced that rustc is dealing with the same scope of problem as GHC in the general case.

But to be clear, anyone with the username the_duke is probably really cool, and you clearly know your stuff as well as having style, so count me as a fan.