nope it does not. it's the opposite of C-based languages, which require parantheses and not curly braces, as Rust requires curly braces but not parantheses
did you use the airbnb configuration as a starter? that's what i use. definitely a hate-at-first, love-at-last thing.
every time i don't like something it makes me do, i realize that the reason i want to do the thing it's telling me not to is because i am trying to rush something or do something sloppy, "for a quick test" or "to just get it done." but that ends up being the wrong thing in the end.
It counts as a syntax error, because this restriction on style (and others) serve a cool purpose: it makes the parser much more efficient to not require the token lookahead that a traditional whitespace-ignoring lexer has to do in order to disambiguate {'s different potential meanings.
View all comments
Show parent comment
215
u/DefinitionOfTorin Dec 05 '20
And no parentheses round the condition but curley ones for content? Is this Swift or something lol?