Multiple RETURN in a procedure
I was actually looking at source code downloaded from ETH. This source code is dated 1994 and is accompanied by the note:
"This directory contains the sources of the Oberon System version 4 for Ceres-2 Workstations. They replace the earlier version 1 sources described in the book "Project Oberon”
Correct, so N. Wirth started from the original version 1 sources when creating Project Oberon 2013. As a side comment, with respect to the LOOP statement - same problem with its multiple EXITs - when porting the compiler itself, he noted in http://people.inf.ethz.ch/wirth/Oberon/PortingOberon.pdf "There were only 4 loop statements in the compiler – a sign of good programming :-) ... In my experience, a careful search for a new formulation is worth while. In all cases, the new solution turned out to be more satisfactory.” So he clearly wanted to promote the new programming style (and actually enforced it by not allowing the old constructs). Personally, I would have considered adding a “retro" option to the compiler, such that it also accepts old language constructs. But N. Wirth never did that in any of his compilers (if I am not mistaken) since the 1960s. He may have felt that then people will just leave the old code and one ends up with a mix of old and new language constructs. But the market / software industry would not accept that.
participants (1)
-
Andreas Pirklbauer