3 ms·
Just remove the ∈ and ⟨ characters, and make braces mandatory: for i 0:N:5 { // loop body } By the way, the same should have been done with if and whi
by loup-vaillant 3y ago
Just remove the ∈ and ⟨ characters, and make braces mandatory:
for i 0:N:5 {
// loop body
}
By the way, the same should have been done with if and while: optional parentheses, mandatory braces:
if a == b {
// code
}
while idx < end {
// code
}
- d-lisp 3y agoIt's possible that parsing a complex condition wrapped by parentheses was found more convenient.
- loup-vaillant 3y agoIt’s not. Not for humans (the extra parenthesis is just useless clutter), and not for machines (I’ve written parsers, both alternatives are as easy to implement).