[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: circular module uses
- To: address@hidden
- Subject: Re: circular module uses
- From: Hugh Greene <address@hidden*.com>
- Date: Fri, 08 Mar 2002 15:45:01 -0500
- Organization: Internet For Busines Limited http://www.ifb.net
- References: <3C890764.439C028D@lucent.com>
- Sender: "Gregory T. Sullivan" <address@hidden>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.8) Gecko/20020204
- Xref: traf.lcs.mit.edu comp.lang.dylan:13978
Gabor Greif wrote:
> If I have a library with three modules (sketch):
>
>
> define library L
> use dylan;
>
> export a,b,c;
> end;
>
> define module a
> export xxx;
> end;
>
> define module b
> use a;
> use c;
> export yyy;
> end;
>
> define module c
> export zzz;
> end;
>
>
> Is it intended that module \b has access to \zzz from module \c ???
>
> I.e. Is it admissible that modules of a library have circular (forward) use dependencies?
There's a forward reference here (where b uses c before the definition
of c) but no circularity (since c doesn't use b). Dylan implementations
are encouraged to allow forward references as much as possible. (I'm
sure it says that somewhere in the DRM but I'm too lazy to look it up
right now :-)
> My idea is that this should be allowed. Is there a reason to forbid it?
Your example should work (IMHO).
> GD does not complain about it at least, but does not see \zzz from inside \b either.
> I guess this is a bug.
That seems weird ... unless you've got some non-default "import:"
clauses on the "use c;" in b's definition?
HTH,
Hugh