[Oberon] Intermediate scopes in Oberon-07
Andreas Pirklbauer
andreas_pirklbauer at yahoo.com
Sat Feb 10 13:16:03 CET 2018
> That may be so but may also be irrelevant. I can't think of any genuine use
> for an intermediate TYPE if intermediate variables of that type are inaccessible.
>
> Can you refer me to an existing real-world practical Oberon example where an
> intermediate type is accessed in a nested procedure?
>
> Chris
I can’t think of any! In a previous post I have provided an implementation that
PO2013 makes the compiler consistent in the sense that ALL intermediate objects
(constants, types, procedures) are now treated identically with respect
to *access rights*, i.e. they cannot be accessed in a nested procedures.
A separate question is of course whether one should allow the ability to *declare*
local types or constants at all - it makes of course sense to keep that possibility.
But if local procedures were *eliminated* from the language one day, then the whole
access discussion goes away completely, since in that case intermediate objects (of
any kind!) simply can no longer exist. There can only be (a) global objects or (b)
objects that are local to (globally declared) procedures.
As I said, one can endlessly debate all this…
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20180210/cadb93a1/attachment.html>
More information about the Oberon
mailing list