Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

rust just got 4x more productive [shill thread]

Name: Anonymous 2016-12-16 15:09

Rust designers developed an idiom for concisely propagating errors outwards with a macro called try!:
let file = try!(File::open("file.txt"));
More recently, Rust shipped an even more concise notation for error propagation, the postfix ? operator:
let file = File::open("file.txt")?;

Name: Anonymous 2016-12-31 20:33

>>23
If you read the article at the link or ever used Rust or ML or Haskell, you wouldn't ask these idiotic questions.

In short, pointers cannot work without NULL, but the type system at least can distinguish between pointers that may point to NULL and things that are definitely not pointing to NULL.

That prevents NULL infecting every fucking type and attacking you from every fucking corner at runtime which is the usual behavior of C/C++/C#/Java programs.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List