[Oberon] Life without local procedures

Chris Burrows chris at cfbsoftware.com
Fri Feb 23 11:05:50 CET 2018

> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> Richard Hable
> Sent: Thursday, 22 February 2018 7:47 AM
> To: oberon at lists.inf.ethz.ch
> Subject: [Oberon] Life without local procedures
> Thus, my vote goes to keeping the support for local procedures in the
> Oberon compilers

I rarely (if ever) find a convincing need for local procedures in my own
code but I would not advocate removing them from Oberon. 

However, what I would be really interested to know is in what circumstances
you would *not* make a procedure local if it *could* be made local. Take for
example the compiler scanner module ORS in Project Oberon 2013. This has no
local procedures. In theory the following procedures could all be declared
local to procedure Get:


Furthermore, the procedure 'Ten' could be nested another level deeper within
procedure 'Number'. Would you have nested all of these procedures if you had
written that module? If not why not?

Similarly an example that puzzles me is procedure Scan in Module XRef in
section 21. Program Decomposition into Modules in the tutorial Programming
in Oberon:


Neither procedure 'heading' nor procedure 'copy' are marked for export. Both
are only called by procedure Scan. 'heading' is global but 'copy' is nested
within Scan. For the life of me I cannot see the difference. If one is
global why not the other one? Conversely, if one is nested why not the other
one? Is it just decided on a whim or am I missing something? 
Chris Burrows
CFB Software

More information about the Oberon mailing list