guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] SRFI-34, SRFI-60 and core bindings


From: Ludovic Courtès
Subject: Re: [PATCH] SRFI-34, SRFI-60 and core bindings
Date: Wed, 14 Dec 2005 11:13:59 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Marius Vollmer <address@hidden> writes:

> When using #:replace, the exporting module is making the promise that
> the warning can be surpressed because everything is alright.  It can
> only do that if the replacing binding is compatible with what it
> replaces.

So I think we disagree.  ;-)  Basically, I'm saying that `#:replace' is
alright when the module /purposefully/ overrides and binding and is
documented to do so, while you say that it should be used only when a
module /compatibly/ overrides a binding.

I still think that one never types `(use-modules (srfi srfi-60))'
inadvertently, which supports the `purposefully' vision.  IOW, the
"common case" (and this is debatable) is that you _want_ `bit-count' to
be overridden when you type this in.  And we want to optimize for the
common case.

In any case, the documentation will have to be updated to whatever
vision you think is right.

> Often, the user of a module also knows that everything is alright and
> wants to surpress the warning.  (That's where you come in,
> Ludovic. :-) The user can only do that by giving parameters to
> use-modules or its own define-module.  He should not go and add a
> #:replace to the exporting module.  The only ways to do avoid the
> duplicate warning for a module user currently are to rename the
> bindings on import, or to use an explicit #:duplicates handler.
> (Right?  Anything else?)

I find this use of duplicate binding policies quite circumvoluted and
unclean for that matter.

> Hmm, I think current usage is in line with what I described above.
> Right?

Right, within Guile.  Outside, current usage may be inexistent because
it was not documented.

Thanks,
Ludovic.




reply via email to

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