[Oberon] Obstacles when programming in RISC Oberon and proposed patches

Richard Hable informujo at aon.at
Sun May 25 19:16:12 CEST 2014

On 05/25/14 13:55, Michael Schierl wrote:

> Am 25.05.2014 13:34, schrieb Richard Hable:
>> I would prefer a solution similar to Java, where the compiler does not
>> allow reading local variables, if it isn't sure that they have already
>> been assigned a value. The Oberon compiler could create warnings in
>> such cases.
> Of course that would be the best solution. Unfortunately, unlike Java,
> Oberon has VAR parameters, which do not really work well with this
> static checking, unless the initialization state of the variable is part
> of the declaration (like it is with C#, where you have "out" parameters

Passing a local variable as a parameter would, of course, also be 
considered reading its value, no matter if passed by value or 
reference (VAR parameter), and thus lead to a compiler warning if it 
might be uninitialized.

> And I don't believe in warnings - I don't like the mess around warnings
> in the C programming language. Either you find a solution that creates
> zero false positives and create errors (not warnings), or don't do it at
> all.

So, don't do it at all then. :)


More information about the Oberon mailing list