Hacker News new | ask | show | jobs
by zamalek 951 days ago
Once you get over the initial hurdle, the syntax is extremely consistent and "guessable." By which I mean, once you know the basics you can guess how to do things that you have never done before - and if it doesn't work there's probably a pending RFC that matches your expectations.

For example, you might learn that you can do `if let Some(foo) = option` to check if some option is Some, but to also extract the value from it. Now you might guess that the let conditionals might work elsewhere, and you'd be right! `while let Some(line) = reader.read()` totally works.

Now compare this to the likes of C, where for example `break` appears in a `switch` for some bizarre reason (yes, I know the actual reason) and `case`s don't have braces.