[Oberon] Clarifying type compatibility in Oberon-07

Diego Sardina dsar at eml.cc
Thu Oct 5 04:17:13 CEST 2017


(Sorry, I had problems with my email client)

> One of the reason for this decision was that
> type inclusion was considered a bad idea to
> start with. It requires the compiler to insert
> hidden type conversions (type casts), which may
> not always be obvious to the programmer or reader
> of a piece of code. Hidden mechanisms generally
> are not in the spirit of Oberon. In Oberon-07 *all*
> type casts must be explicitly programmed.
[...]
> I would therefore plead to simply drop type inclusion
> altogether from the language
 
The goal of type inclusion was to write generic code, a
math module written for LONGREAL also works for SHORTINT.
Oberon-07 solved this by reducing the number of types, but
in the case of N basic types you need to write N modules.

 
--
Diego Sardina



More information about the Oberon mailing list