[Oberon] Oberon usage
joerg.straube at iaeth.ch
Mon Jul 12 17:52:06 MEST 2010
I'm a strong supporter of Oberon.
I agree with your view on input/output:
It is very system dependent and should be in a Library
instead of the language itself.
I think Dennis had a more pragmatic approach in mind,
where he wanted to have a built-in IO procedure with open
nbr of parameters à la Pascal. Only a compiler can
allow that and hence should be part of the language.
I see Dennis' point but find the Oberon approach - although
more verbose - clearer. Strong type checking is not possible
with "write"; the compiler must take the base type of the
actual parameter to determine the correct write routine per
parameter and generates code for a certain output pipe.
In Oberon you have the benefit of checking formal and
actual parameter types and can decide on your own where
you want your IO to happen...
A word to initialization: We have to distinguish two
different scenarios: Static and dynamic. You're right:
Oberon allows the static initialization in the MODULE body.
As Chris showed briefly in an mail, with this mechanism
we can initialize MODULE variables to a given value,
and the client modules can use those pre-initalized
center := Point.null
But in Oberon the dynamic initialization after a NEW has to
be coded by hand. That was one of the reasons why Active
Oberon added the initializer marked with "&".
This function is automatically called after a NEW and
initalizes the new variable with a default value.
More information about the Oberon