Rust's Result is definitely the best error-handling experience I have ever had. I started working on some Typescript stuff after using Rust for a few weeks and had to implement my own Result. It's just so easy and clean that it leaves exceptions in the dust. I don't think I can live without Results anymore.

Now I understand why everyone loves rust so much. It's just so clean, safe, easy (after you get the hang of it) and so fucking powerful (procedural macros are awesome).

I want to use Rust everywhere now <3

  • 2
    Railway code is always nice. I use rxjs to do the same.
  • 2
    @SortOfTested what's Railway code?
  • 3
    Railway programming encapsulates the concept of whether an operation success or fails and discriminate the branch based upon the type of the result.

    Result used to be called Either (aka, the either monad), which is a common implementation of this concept.
  • 2
    @SortOfTested Oh, nice! I didn't know there was a name for this. Thanks for making me a bit more knowledgeable!
  • 0
    @LesMore yes! I'm also planning to take a look into rust to WASM. I was searching about it yesterday and it seems you can make pretty small binaries, but it probably grows a lot when using std libs. It would be awesome if we could develop an entire web app in rust. Probably not possible, I think it would be too big, but a man can dream.
Add Comment