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

Joerg joerg.straube at iaeth.ch
Sun Feb 16 13:35:47 CET 2020


Chris

you‘re absolutely right the aliases must not be allowed on the righthand side.

If I think of a possible implementation, the righthand sides and lefthand sides might live in different scopes, eg lefthand side are objects visible in the well known topscope, the righthand sides (aka filenames :-) might live in a new importscope... Just thinking loud.

br
Jörg

> Am 16.02.2020 um 13:16 schrieb Chris Burrows <chris at cfbsoftware.com>:
> 
> 
>> 
>> -----Original Message-----
>> From: Oberon [mailto:oberon-bounces at lists.inf.ethz.ch] On Behalf Of
>> Paul Reed
>> Sent: Sunday, 16 February 2020 10:38 PM
>> To: ETH Oberon and related systems
>> Subject: Re: [Oberon] Module aliases - what is the correct way to
>> handle them
>> 
>> Hi Chris,
>> 
>>> I think that the language spec does have such a restriction. In one
>> M0
>>> is a module alias, in the other M0 is an actual module name. A
>> single
>>> identifier (i.e. M0) can't be used for two different purposes in
>> the
>>> same scope... the report says nothing about the order in which the
>>> import list should be processed.
>>> IMPORT Z := M0, M0 := M1 ... Should be treated identically to
>> IMPORT
>>> M0 := M1, Z := M0
>> 
>> Thanks, and (I'm sorry if this is boring for everyone else) now I'm
>> beginning to see that Jorg and I are thinking one way and you and
>> Andreas are perhaps thinking another, which has helped me understand
>> where the complications have come in.
>> 
>> I don't have a problem with the above being switched around because I
>> (and Jorg) see the aliases and the canonical module names as
>> different things.  I think you and Andreas are allowing a module
>> alias to appear on the right hand side of an alias definition, but I
>> wouldn't.  What's right?
>> 
> 
> No - I agree with you. I was just pointing out that if aliases were allowed
> on the right hand side of an alias definition it could result in ambiguous
> import lists.
> 
> --
> 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