3 ms·
Well, this is embarrassing. I'm using a small Rust example to make a point about C oddities, and then a Rust Core team member points out a syntax error in my ex
by themulticaster 5y ago
Well, this is embarrassing. I'm using a small Rust example to make a point about C oddities, and then a Rust Core team member points out a syntax error in my example!
In my defense, I'd say the return keyword - combined with the different semicolon rules - is one of the more confusing and subtle syntactic differences when learning Rust from a C/C++ background. After a few weeks of programming C++ I always use return more often than necessary.
- steveklabnik 5y agoOh absolutely! If you haven’t worked with expression-based languages before, it’s a big mental shift. In my experience it’s harder to come back to one that isn’t after you’ve done things this way for a while. There’s an adjustment period for sure.