[Oberon] Block objects for Oberon

Richard Hable informujo at aon.at
Wed Apr 8 20:01:36 CEST 2020


On 07.04.20 22:38, rochus.keller at bluewin.ch wrote:
> @ Richard Hable
> 
> Thanks for the link. The concept actually dates back to Simula 67. Dahl and Nygaard were inspired by Algol 60 blocks and advanced it to classes which essentially are dynamic blocks.

The idea of passing blocks of statements as parameters is, of course,
not new at all. The paper actually cites Wirth’s rather obscure “A
Generalization of Algol” proposal from 1963 as an ancestor:

https://dl.acm.org/doi/abs/10.1145/367593.367619

And probably LISP had such a feature even earlier.

However, the proposed solution is a lot simpler than that: it works
without dynamic memory allocation, higher-order functions, captured
variables etc.

The passed blocks are executed in the frame of the calling procedure,
and share their variables with the iterator procedure via
call-by-reference (“var”) parameters. Hardly any extensions are needed
to the programming language and compiler.

Richard





More information about the Oberon mailing list