[Oberon] Clarifying type compatibility in Oberon-07

Jörg joerg.straube at iaeth.ch
Sun Oct 8 14:24:47 CEST 2017


Richard

If you use the type „Texts.Frame" you have to know that you can use „hasCar", „lsp" or „selbeg“. You don’t repeat all RECORD fields.
If you use the type „RealFunction“, you have to know that „v“ is part of it. Why shall it be different?

Jörg 

> Am 08.10.2017 um 14:10 schrieb Richard Hable <informujo at aon.at>:
> 
> On 2017-10-08 13:55, Jörg wrote:
>> No.
>> If we allow anonymous procedures, you don't have to declare parameters again. They are stated in RealFunction already.
>> It should be enough to write
>>  Integral ( RealFunction(RETURN Math.sin(v)), 0.0, Math.pi));
> 
> This is a matter of taste. In my opinion, omitting formal parameter
> names in anonymous functions makes source code difficult to read.
> 
> 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