4 ms·
There's actually sense to the magic words. Each word which opens a block has a unique word which ends the block. So, begin..end, if..end if, loop..end loop, etc
by david-given 10y ago
There's actually sense to the magic words. Each word which opens a block has a unique word which ends the block. So, begin..end, if..end if, loop..end loop, etc.
The advantage of this is that it's much harder to screw up block terminations --- one thing I've done many times in C is when closing a chain of blocks with:
}
}
}
do_something();
}
}
is to miscount the braces and put do_something() in the wrong place. In Ada, that'd be:
end if;
end;
end case;
do_something();
end loop;
end;
...which is far more meaningful.
- user12357z7 10y agoYou should read about how to write clean code... (instead of switching to another programming language)
- deleted 10y ago[deleted]
- flukus 10y agoThat sounds like the cyclomatic complexity is too high.