News for hackers. Stuff that matters.
Re:Using Rust at a Startup: A Cautionary Tale by Aeolun on Wednesday November 23, 2022 @04:31AM (#33716998)
I dunno, if my exceptions would have to be manually rethrown every time, I’d get really cranky very quickly.

I don’t think that’s any better in Rust though.

Re:Using Rust at a Startup: A Cautionary Tale by ColonelPhantom on Wednesday November 23, 2022 @05:54AM (#33717611)
Rust has many convenient shorthands like the ? operator, where `let x = foo()?` is equivalent to

  let x = match foo() {
      Ok(value) -> value,
      Err(e) -> return Err(e),
  }
Re:Using Rust at a Startup: A Cautionary Tale by cesarb on Wednesday November 23, 2022 @08:21AM (#33718792)
IIRC, `let x = foo()?` is actually equivalent to

  let x = match foo() {
      Ok(value) -> value,
      Err(e) -> return Err(e.into()),
  }
Which can automatically convert one error type into another when the appropriate From and/or Into impls exist.
Re:Using Rust at a Startup: A Cautionary Tale by steveklabnik on Wednesday November 23, 2022 @10:22AM (#33720269)
It is a little more complex than that these days

https://github.com/rust-lang/rust/blob/4e0d0d757e2f1b61ec809...

Re:Using Rust at a Startup: A Cautionary Tale by rob74 on Wednesday November 23, 2022 @03:51PM (#33724363)
Many convenient shorthands that you all have to be familiar with before being able to write (and read) Rust competently. I guess that's what they mean with the steep learning curve...