[Oberon] Easter eggs in Oberon
joerg.straube at iaeth.ch
Wed Apr 15 21:48:51 CEST 2020
>> 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.
More information about the Oberon