[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: top-repl priority of guile module
From: |
Ludovic Courtès |
Subject: |
Re: top-repl priority of guile module |
Date: |
Fri, 15 Dec 2006 09:32:45 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
Hi,
Neil Jerram <address@hidden> writes:
> It seems to me, though, that this is all a matter of ordering, not of
> whether the duplicates processing gets invoked. I don't know all the
> details of the duplicate processing, but by default I would expect a
> later use-modules (or similar operation) to override an earlier one.
> Is that what happens?
Roughly, yes. However, the semantics of `module-use!' are very
different from those of `use-modules' (unlike what one might think ;-)).
While `use-modules' honors the duplicate binding policies, including
`replace' as Kevin noted, `module-use!' does no such thing: it blindly
overrides bindings. A more important concern is that the order of
`module-use!' invocations matters, which leads to all these strange side
effects.
`module-use!' is a low-level primitive that really should not be used by
the "normal user" IMO. Instead, one should rather use
`module-use-interfaces!' which has the same semantics as `use-modules'.
Getting back to the problem at hand: Since we want to emulate the
behavior of `use-modules', the safest way would be to use
`module-use-interfaces!', although we can certainly find (fragile?)
workarounds.
Thanks,
Ludovic.
- top-repl priority of guile module, Kevin Ryde, 2006/12/01
- Re: top-repl priority of guile module, Ludovic Courtès, 2006/12/04
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/04
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/04
- Re: top-repl priority of guile module, Ludovic Courtès, 2006/12/05
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/08
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/08
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/14
- Re: top-repl priority of guile module, Kevin Ryde, 2006/12/14
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/30
- Re: top-repl priority of guile module,
Ludovic Courtès <=
- Re: top-repl priority of guile module, Neil Jerram, 2006/12/30