[Oberon] IMPORT Modules: why does order matter?
PeterMatthias at web.de
Sun Mar 3 22:19:49 CET 2019
Am 03.03.19 um 21:49 schrieb Till Oliver Knoll:
> Again, I do take it that there*must* be some technical reason for this,
> at least that it simplifies the compiler itself. But I still don't quite
> get it what the compiler is trying to tell me here... and yes, the above
> ModuleClient compiles perfectly once we switch the import order, so:
> IMPORT ModuleA, ModuleB; (* much better now - compiles *)
My wild guess:
It's easier to check symbol file consistency this way. Imagine ModuleB
also imports ModuleA0, ModuleA1... compiler has to store all imported
symbol files' checksums of ModuleB if it would be allowed to import
ModuleA after ModuleB. If ModuleA is imported first, compiler already
knows needed symbol file.
More information about the Oberon