[Oberon] Unneeded restrictions on local procedures

Diego Sardina dsar at eml.cc
Thu Dec 21 18:53:42 CET 2023


On Thu, Dec 21, 2023, at 18:41, August Karlstrom wrote:
> They are (almost) necessary for mutual recursion. There is an 
> alternative in which you utilize a procedure variable to compensate for 
> the absence of forward declarations in the language but it's neither as 
> elegant nor as performant.
>

Wirth talks about them in PIO, page 35:

"This example also illustrates a case of local procedures. Notably, factor is declared local to term, and term local to expression, following the rule that objects should preferrably be declared local to the scope in which they are used. *This rule may not only be advisable, but even crucial*, [...]"

-- 
  Diego Sardina


More information about the Oberon mailing list