Let futures be futures (without.boats)
from snaggen@programming.dev to rust@programming.dev on 04 Feb 18:13


BatmanAoD@programming.dev on 06 Feb 15:46 collapse

The bit about Rob Pike at the end is killer.

sugar_in_your_tea@sh.itjust.works on 08 Feb 03:19 collapse

What’s the part about Rob Pike? I didn’t see anything mentioned in the article.

BatmanAoD@programming.dev on 08 Feb 15:09 collapse

It doesn’t mention him by name, but he’s the “language designer of some renown” alluded to here:

If you were a language designer of some renown, you might convince a large and wealthy technology company to fund your work on a new language which isn’t so beholden to C runtime…

sugar_in_your_tea@sh.itjust.works on 08 Feb 16:02 collapse

Ah, thanks, makes sense. I largely skimmed the conclusion, so I guess I didn’t make that connection.

I did think about Go throughout the article, since it basically uses “green” functions everywhere. I guess I got tripped up when they mentioned “effect handlers,” which isn’t a thing in Go AFAIK (then again, I’m not a language designer), unless it’s used under the hood.

BatmanAoD@programming.dev on 08 Feb 16:28 collapse

Ah. No, keep reading:

In a less than optimal world, you might decide to do something less inspired. You might take that break from the C runtime and then just implement threads again, with basically the same semantics, except that they are scheduled in userspace. Your users would be required to implement concurrency in terms of threads, locks and channels, just like they had always been in the past. You might also decide your language should have other classic features like null pointers, default constructors, data races and GOTO, for reasons known only to you. Maybe you would also drag your feet for years on adding generics, despite frequent user requests. You might go do that, in a less than optimal world.

(Emphasis on “go” is in the original.)

sugar_in_your_tea@sh.itjust.works on 08 Feb 23:03 collapse


just implement threads again, with basically the same semantics, except that they are scheduled in userspace

To be fair, the Go implementation here is quite interesting since it scales way better than OS threads, so there are fewer downsides to spinning up a ton of threads. So it’s closer to async abstracted behind a threading veneer, like the GREEN functions in the article.

Though the “known only to you” criticisms are absolutely on-point.

BatmanAoD@programming.dev on 08 Feb 23:06 collapse

Yeah, Boats’ point there is definitely about semantic correctness rather than performance. Goroutines do indeed have good performance.