[Oberon] Block objects for Oberon
Joerg
joerg.straube at iaeth.ch
Wed Apr 8 20:16:50 CEST 2020
Richard
Yes, I fully understand the concept.
My question was rather: is it really needed?
I mean, the difference between
collect.forEach(obj, DO statements END);
with a block construct or
WHILE collect.forEach(obj) DO statements END;
Is not so huge, is it?
br
Jörg
>> Am 08.04.2020 um 20:02 schrieb Richard Hable <informujo at aon.at>:
>>
>> 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
>
>
>
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list