<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > From: </span></font></span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Chris Burrows <a href="mailto:chris@cfbsoftware.com" class="">chris@cfbsoftware.com</a> </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">Sat Feb 10 01:28:16 CET 2018</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> ></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > The PO2013 system consists of a total of approximately 850 procedures.</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > I could only find 17 that were local procedures. Of those 17 I couldn’t</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > find a single example where the enclosing procedure had a TYPE or CONST</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > declaration. That did not surprise me at all.</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Interesting statistics. This means that it should be “safe" to change</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">the </span></font></span><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">implementation of the language, </span></font></span><span style="white-space: pre-wrap; font-family: monospace;" class="">such that access to intermediate types</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">and constants is no longer allowed.</span></div><div class=""><br class=""></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > However, when I looked a bit further, what did come as a surprise</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > was that I could find only ONE local TYPE declaration and only eight</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > local CONST declarations (5 of those in Math.Mod) in the entire system
</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> ></span></font></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> > If these sorts of statistics were common to other current real world</span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > Oberon applications it would be reasonable to ask whether not only </span></font></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""> > local PROCEDUREs, but also local TYPEs, are really *needed*.</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">This </span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">would </span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">leave us with a language that only has *global* procedures</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">and within these global procedures all one can have is local *variables*.</span></font></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">i.e. no more </span><span style="font-family: monospace; white-space: pre-wrap;" class="">local types, local constants or local (nested) procedures.</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">A welcome side effect would be a(n even) simpler compiler.</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">However, I don’t know whether these sorts of statistics is indeed</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">common to </span></font><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">other current "real world" Oberon applications. </span></font><span style="font-family: monospace; white-space: pre-wrap;" class="">I did a</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">quick check for the </span><span style="font-family: monospace; white-space: pre-wrap;" class="">Oberon System 3 (ETH Oberon), </span><span style="font-family: monospace; white-space: pre-wrap;" class="">Oberon </span><span style="font-family: monospace; white-space: pre-wrap;" class="">V4 </span><span style="font-family: monospace; white-space: pre-wrap;" class="">(Linz</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">Oberon) and ETH A2 (formerly </span><span style="font-family: monospace; white-space: pre-wrap;" class="">AOS) systems. At least in those </span><span style="font-family: monospace; white-space: pre-wrap;" class="">systems,</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">local </span><span style="font-family: monospace; white-space: pre-wrap;" class="">TYPE </span><span style="white-space: pre-wrap; font-family: monospace;" class="">and CONST declarations </span><span style="white-space: pre-wrap; font-family: monospace;" class="">seem to be </span><span style="font-family: monospace; white-space: pre-wrap;" class="">very rarely used indeed.</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">There are, however, local </span><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">procedures, in use, </span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">just like in PO2013,</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">but not too many. These could certainly be converted to global ones.</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > All of these features were *absolutely essential* in the Pascal</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > days when all you had was a single PROGRAM file. But since the</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > introduction of MODULEs in Modula-2 and the simplification of</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > TYPEs in Oberon they have become less and less significant</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Exactly right. One could say that since Modula-2 the module</span></font></span><span style="white-space: pre-wrap; font-family: monospace;" class=""> has</span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">become the primary information hiding mechanism.</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">
> ... or would that be a case of making it simpler</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > than "as simple as possible”?</span></font></span></div><div class=""><span class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></span></div><div class=""><span class=""><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">This is another one of those questions</span></font><span style="white-space: pre-wrap; font-family: monospace;" class=""> that can be debated endlessly.</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">I would only </span><span style="white-space: pre-wrap; font-family: monospace;" class="">argue for consistency across the board, e.g.,</span></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">1. *If* local procedures are kept in the language, *</span></font><span style="white-space: pre-wrap; font-family: monospace;" class="">then* one might as</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">well keep local types and constants (as is currently the case in PO13)</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class=""><br class=""></span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">2. *If* access to intermediate *variables* (i.e. variables declared</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">in an enclosing </span><span style="white-space: pre-wrap; font-family: monospace;" class="">procedure scope) is not allowed in the language (as</span></div><div class=""><span style="white-space: pre-wrap; font-family: monospace;" class="">is the case since the Oberon-07 revision)</span><span style="font-family: monospace; white-space: pre-wrap;" class="">, *</span><span style="font-family: monospace; white-space: pre-wrap;" class="">the*n one should probably</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">also not </span><span style="font-family: monospace; white-space: pre-wrap;" class="">allow access to </span><span style="font-family: monospace; white-space: pre-wrap;" class="">intermediate types </span><span style="font-family: monospace; white-space: pre-wrap;" class="">and constants (this is</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">where </span><span style="font-family: monospace; white-space: pre-wrap;" class="">Oberon-07 is inconsistent at the moment).</span></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Again, I had suggested to eliminate local procedures </span></font><span style="font-family: monospace; white-space: pre-wrap;" class="">altogether in</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">the past - </span><span style="font-family: monospace; white-space: pre-wrap;" class="">now that access to intermediate *variables* is no longer</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">possible (</span><span style="font-family: monospace; white-space: pre-wrap;" class="">since the Oberon-07 language revision). But it was decided</span></div><div class=""><span style="font-family: monospace; white-space: pre-wrap;" class="">to *keep* local procedures </span><span style="font-family: monospace; white-space: pre-wrap;" class="">in the </span><span style="font-family: monospace; white-space: pre-wrap;" class="">language.</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Regards,</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class="">Andreas</span></font></div><div class=""><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></font></div><font face="monospace" class=""><span style="white-space: pre-wrap;" class=""> > Regards,
> Chris
<br class="Apple-interchange-newline"></span></font><br class=""></span></div></body></html>