[Oberon] Life without local procedures

Richard Hable informujo at aon.at
Wed Feb 21 22:16:34 CET 2018

Picking up a dying thread: Today, I actually missed local methods when
programming in Java:

I needed to search through a file line-by-line, splitting each line into
parts and comparing some of those parts to the values I looked for. In
order to keep the implementation readable, I extracted the line handling
code into a separate method. Ideally, this would have been a local
method with access to the local variables of the calling method.

I ended up creating a private method visible to the whole class, with
more parameters than should have been necessary, and accessing member
variables where it should only have to access local variables of the
calling method.

Thus, my vote goes to keeping the support for local procedures in the
Oberon compilers, including access to intermediate variables...

More information about the Oberon mailing list