[Oberon] Coding practice [Was: Re: Hennessy.Mod 64kB limit]

Skulski, Wojciech skulski at pas.rochester.edu
Thu Feb 20 15:50:00 CET 2020


let's strike a deal:

   a[i] > a[i+1] THEN temp := a[i]; a[i] := a[i+1]; a[i+1] := temp 

> If the code gets too complex, I either use more lines (if speed is important) or I create a procedure.

Trying to pack the procedures in Oberon to be less than one page is futile because the unit of understanding is not a procedure, but a module. A module might span less than one page, but most often it is larger. Packing the code into long lines is not an effective method to reduce the module to fit onto one page or one screen. One should rather follow good programming style and let the size grow, if needed. I believe that the example above shows a good practice, while packing these three lines into one line is a bad practice.


More information about the Oberon mailing list