[Oberon] Easter eggs in Oberon
fusionfile at gmail.com
Wed Apr 15 22:22:21 CEST 2020
On 2020-04-15 21:48, Jörg wrote:
> 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.
The reason "/" is not used to calculate the integer quotient is because
it is not the same as the quotient. In mathematics 1/2 is one half, not
zero (even if C programmers don't agree). Having a notation which
clashes with mathematics is not a good idea.
More information about the Oberon