ekuber , an Random Englisch
@ekuber@hachyderm.io avatar

My coworkers ask for help with a compiler error... once...

...and then I run and try to mechanize my explanation and put it back in the compiler.

Our dev tools need to talk to humans in the way humans talk. Nobody is an expert on everything, helping newcomers (with better tools, better docs, better errors) helps everyone.

That's really the trick behind the rustc diagnostic output: it's not about a technology, its an attitude.

ekuber OP ,
@ekuber@hachyderm.io avatar

rustc doesn't have good diagnostic messages because of some technological breakthrough. It has good diagnostic because we look at how people use our tools, noticing when things confuse people, and changing the output to match people's mental model.

romac , an Random Englisch
@romac@hachyderm.io avatar

TIL in Rust one can use .. in tuple patterns to omit elements, much like in struct patterns:

fn foo() -> usize {
match (1, true, "foo", 2) {
(1, .., y) => y,
(x, true, ..) => x + 1,
(.., foo, y) => foo.len() + y
}
}

imperio , an Random Englisch
@imperio@toot.cat avatar

Next Paris @rust meetup will be on the 11th at the Sorbonne university!

This time, we are also sponsored by the Rust Foundation!

You can register here: https://mobilizon.fr/events/681b42dd-a456-4bfc-99e2-d1c60e867cbb

See you there!

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • haupteingang
  • Alle Magazine