-
Notifications
You must be signed in to change notification settings - Fork 265
Closed as not planned
Labels
Description
In a single statement function
a: () -> int =
13;
b: () -> int = {
return 42;
}
and in a for-loop with only one statement
v: vector = (1, 2, 3, 4, 5);
for v do (i) {
print("(i)$ ");
}
println();
for v do (i)
print("(i)$ ");
println();
curly braces are optional.
But for if
b:= true;
if b {
println("b is true");
} else {
println("b is false");
}
and while
v := :vector = (1, 2, 3, 4, 5);
i := 0U;
while i < v.size() next i++ {
print("(v[i])$ ");
}
println();
curly braces are mandatory. This seems inconsistent to me. Or do I miss something?