[Oberon] Intermediate scopes in Oberon-07

Chris Burrows chris at cfbsoftware.com
Sat Feb 10 12:35:45 CET 2018

> -----Original Message-----
> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
> ????? ??????
> Sent: Saturday, 10 February 2018 9:40 PM
> To: oberon at lists.inf.ethz.ch
> Subject: Re: [Oberon] Oberon Digest, Vol 165, Issue 5
> Andreas Pirklbauer wrote:
> > However, if this is the line of argumentation, it is hard to see
> why access to intermediate *variables* should be considered bad
> programming practice, while access to intermediate *constants* or
> *types* should not.
> But there actually is a difference between variables on one side and
> constants and types on another side. The difference is that one can
> change the value of a variable after it is defined, but once a
> constant or a type is defined, it can not be changed, it simply does
> not have a value to change. This does not however mean that a
> programmer can't change the type declaration itself in some time in
> the future, but is it really a problem? Changing a variable's value
> from an unexpected place in the program is a problem.

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?


More information about the Oberon mailing list