[Oberon] Module aliases - what is the correct way to handle them

Michael Schierl schierlm at gmx.de
Sun Feb 16 13:17:10 CET 2020


Am 16.02.2020 um 12:50 schrieb Chris Burrows:

> If that is not true and a single identifier can be used twice in the import list then note that the report says nothing about the order in which the import list should be processed. Does that mean that:
>
> IMPORT Z := M0, M0 := M1
>
> Should be treated identically to
>
> IMPORT M0 := M1, Z := M0
>
> just in case one implementation processes the list from left to right and the other from right to left?

Hmm, that's an interesting point. I always assumed the left-hand side
and right-hand side of module aliases to be independent, i.e

IMPORT X := Y, Y := X;

being perfectly valid, resulting in all exported symbols of module Y
being available under name X and vice versa.


Not that I would suggest anybody should actually do this in his code...


Regards,


Michael


More information about the Oberon mailing list