3 ms·
The last point is very likely by design: Only when you see a LOOP do you have to worry about early exits. For the other, more common constructs, you instantly k
by layer8 4y ago
The last point is very likely by design: Only when you see a LOOP do you have to worry about early exits. For the other, more common constructs, you instantly know there won’t be an exit somewhere in the middle, and you can reason about its termination behavior solely based on the loop conditional.
- illiarian 4y agoIt's not by design, not really. Early Pascal/Modula/Oberons were extremely anal about loops (of any kind) never having any early exits, ever. Then they ran into the real world. So each consecutive version of Oberon either added early returns or removed early returns. Sometimes like clockwork. And also added/removed other types of loops in pursuit of some unspecified ideal of simplicity. You can see part of that history in the overview of differences: https://oberon-lang.github.io/2021/07/16/comparing-oberon+-with-oberon-2-and-07.html https://oberon-lang.github.io/2021/07/16/comparing-oberon+-w... So it's a self-imposed constraint that makes very little sense.