[Oberon] IMPORT Modules: why does order matter?

Richard Hable informujo at aon.at
Sun Mar 3 16:13:13 CET 2019


On 03.03.19 00:13, Andreas Pirklbauer wrote:

> But the question is whether one *should* allow imports to be declared
> in *any* order. This could be endlessly debated...

Really?

To me it seems completely clear that the user of modules should *not*
have to know about (hidden) implementation details like dependencies
between those modules.

Let’s say, I explicitly use the services of some third-party modules X
and Y in my code. I import them in the order X, Y and everything works fine.

One day, the implementor of X and Y decides to do a refactoring, which
does not change the interfaces of the modules, but leads to a dependency
between those modules: X now imports Y.

And suddenly, for no good reason, my module does not compile anymore.

Richard


More information about the Oberon mailing list