3 ms·
Your last three examples are syntactically invalid Rust. It should be more like: <'_> #[foo] stuff::thing::blah match gloop(gloop) { x @ _ => x } if
by wizzwizz4 3y ago
Your last three examples are syntactically invalid Rust. It should be more like:
<'_>
#[foo]
stuff::thing::blah
match gloop(gloop) { x @ _ => x }
if fizz { |buzz| Some(buzz) } else { |_| None }
Meh => |wtf| ()
- JodieBenitez 3y agoYou're certainly right, I just copy/pasted stuff from the article and changed identifiers, probably adding errors in the process, but the point was never to give accurate examples, just point that even reading Rust code requires significantly more learning than other languages. YMMV of course. Thanks for correcting me. Still not a joy to read though.
- wizzwizz4 3y agoIt requires less learning than Haskell. A tad more than C. Less than C++.
- maleldil 3y ago> Less than C++ That depends. Rust requires less learning than C++ for writing safe code. There are plenty of C++ developers that feel like they know the language but produce unsafe code. Rust won't let you do that, so these developers complain.