[Oberon] Tidyness of iteration.

Bob Walkden bob at web-options.com
Mon Nov 14 20:35:14 CET 2016


(One must wonder about discarding REPEAT and WHILE and retaining LOOP with
strictly one EXIT.)

Er, definitely not. The read-ahead technique is very valuable in structuring the software to match the structure of the input stream. It's a key technique in Jackson Structured Programming, for example. It makes code a lot easier both to write and, perhaps more importantly, to read and understand. I can't tell you the number of programs over the years that I've had to deal with where the programmer didn't understand this and consequently ended up with a buggy, difficult-to-maintain mess.

The programming language RPGIII, at least when I used it in the 90s, had by default an automatic outer loop structure and you determined your position in the structure by means of bit-flags. It led to some really messy code, which although quick to write (partly because of in-built DB2) was difficult to support. Especially at 3:30 on a Sunday morning over a telephone dial-up.

If any of those are to be discarded, let it be LOOP, which encourages badly-structured code.

B


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20161114/6ab04f76/attachment.html>


More information about the Oberon mailing list