Pre-RFC: flexible `try fn`

@scottmcm Another comparison between async/try: throw “initiates” the error path, and the hidden yield inside await “initiates” the supsension path. We might want to pay attention to how those interact as well.

For example we currently require all manual initiations of suspension to be done the manual way, which can just be wrapped up in a hand-written Future that you can await. So we may want to consider that for throw as well- instead of making it built-in, just make it a library function that always returns an Err that you can then ?. (This is basically "make a nicer name for Err(x)?".)

(ugh Discourse really has a lot of ways to accidentally send posts…)

1 Like