Re:Humans should think of sizeof() as a function, says Linus...
by Udo on Saturday May 30, 2015 @07:25AM
(#9629800)
No, not always. Not in Go, or in Rust, or Ruby, for example. The assumption being in these languages that if is followed by an expression and that expression is parsed to its natural end anyway - but this only works if the syntax allows for that end to be found without ambiguity.
[ Parent
| on HN ]
Re:Humans should think of sizeof() as a function, says Linus...
by krylon on Saturday May 30, 2015 @07:44AM
(#9629842)
In Go, however, go fmt will remove the unnecessary parentheses. I was very annoyed at first, when I saw this, but I got used to it.