News for hackers. Stuff that matters.
Re:Rust async-await status report 2 by anp on Wednesday July 10, 2019 @11:36AM (#20402969)
> If you want JavaScript's behavior around failure, you make the final value a Result, it's not built-in.

Fun bit history: the first pass at Futures did return an error type explicitly: https://docs.rs/futures/0.1.28/futures/future/trait.Future.h.... IIUC the idea was that Futures were for performing I/O which is effectively always fallible. I assume that it's an easy design decision to make looking at all of the other languages with similar designs. I'm very glad Rust has nicely orthogonal "deferred"/"fallible" types now.

There are no comments on this comment yet.