Parenthesis around if/for/while condition is not necessary
aedt
adnansignsup at gmail.com
Sat Jun 23 01:27:30 UTC 2018
for line in stdin.lines() {}
if condition {}
while condition {}
for init; condition; op {}
What's the rationale of keeping the requirement that the
condition of if/for/while must be wrapped with a parenthesis
(other than keeping parser simple)? Modern languages have already
dropped this requirement (i.e. Rust, Nim) and I don't see any
reason not to do so.
More information about the Digitalmars-d
mailing list