[Oberon] SystemV- Heap + Module Space
informujo at aon.at
Sat Jan 5 17:53:12 CET 2019
On 05.01.19 13:21, Chris Burrows wrote:
> I would have defined all of those res values as exported named constants in
> module Modules.
But then you would have to modify the interface of module Modules each
time the result values of the procedure changed. And all dependent
modules would have to be recompiled and potentially adapted—even for
such harmless changes as removing a value which is not needed anymore,
like the mysterious value 6.
Thus, in the interest of stable module interfaces, it actually seems to
be a good idea to avoid defining constants for return values which might
change over time.
> Apart from all the other advantages of using named constants that would have
> made it easier to eliminate the potentially confusing, missing value, res =
> 6, which presumably used to exist.
No harm done in the current solution: if there are clients of the module
which still check for result value 6, they still work.
Similarly, if additional result values are introduced in the future, all
the existing clients will continue to work: they will still know that
module loading failed, because the result value was different to zero,
they will just not know the precise reason.
More information about the Oberon