[Oberon] Easter eggs in Oberon

Jörg joerg.straube at iaeth.ch
Wed Apr 15 21:48:51 CEST 2020


August

>> Why do you have to change THREE things when going from INTEGER to REAL
>>    i := i DIV 5;
>>    r := FLT(i) / 5.0
> It makes
> 
>    * the language simpler
>    * the compiler simpler
>    * it easier to reason about the result without having to remember implicit conversion rules.

Introducing an additional keyword DIV makes the language slightly more complex.
Mapping / to the ORG.DivOp() does make the compiler simpler.
 i := i / 5; has no conversion rules. Its just another (simpler) form of DIV.

kr
Jörg


More information about the Oberon mailing list