guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New module system option :duplicates


From: Rob Browning
Subject: Re: New module system option :duplicates
Date: Fri, 07 Mar 2003 10:30:34 -0600
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Mikael Djurfeldt <address@hidden> writes:

> The module system now can check for duplicate imported bindings.
> The syntax to enable this feature is:
>
> (define-module (foo)
>   :use-module (bar)
>   :use-module (baz)
>   :duplicates check)
>
> This will report an error if both (bar) and (baz) exports a binding
> with the same name.

Interesting.  Though I had thought that we were already heading in the
direction of being less tolerant of duplicate bindings as a default.

In any case, I would definitely be interested in thinking about
special treatment for generic functions.  Does anyone know offhand
what other systems do in this regard, say CLOS for example?  Naively,
it doesn't seem like (open <file>) should conflict with (open
<gripper>), but I haven't thought about the issue enough yet to feel
confident about that.

Also, doesn't ttn already have an augmented module system syntax for
renaming, etc.?  If so, and if people are using it much, then it might
be worth considering that syntax as well, and I seem to recall that
Marius may have been planning something on this front too...

> This implies that x in (math 2D-vectors) can see the methods of x in
> (my-module) and vice versa, while x in (math 2D-vectors) doesn't see
> the methods of x in (math 3D-vectors), thus preserving modularity.

Why would x in (math 2D-vectors) be able to see the methods of x in
(my-module)?  Isn't that a violation of modularity?  The reverse I
understand.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]