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

Jörg joerg.straube at iaeth.ch
Mon Jul 13 19:17:18 CEST 2020


Karl

I agree that the import implementation of the compiler in ProjectOberon is too simplistic.
We had this discussion already and Andreas provided a solution for this.

Generally speaking, the LHS and RHS of an import alias have nothing to do with each other.
RHS is a name of a sym file, LHS is an identifier to be used in your code.
The import order does/should not matter, as the implementation should look up the LHS and RHS in different name spaces.

br
Jörg

Am 13.07.20, 18:28 schrieb "Oberon im Auftrag von August Karlstrom" <oberon-bounces at lists.inf.ethz.ch im Auftrag von fusionfile at gmail.com>:

    On 2020-07-13 17:57, Joerg wrote:
    > Debug output could be coded like this
    >      IMPORT Out, Debug := Out;
    > and all your debug output like Debug.Str(“packet sent“) appears on screen.
    I don't think we can (or should) rely on the import order; an Oberon 
    implementation could choose to import modules from right to left and 
    it's not obvious that a module should be allowed to be imported twice.
    
    -- August
    --
    Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
    https://lists.inf.ethz.ch/mailman/listinfo/oberon
    




More information about the Oberon mailing list