unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] SRFI-34, SRFI-60 and core bindings
Date: Wed, 28 Dec 2005 20:14:35 +0000	[thread overview]
Message-ID: <87bqz1j7x0.fsf@ossau.uklinux.net> (raw)
In-Reply-To: <878xuougt4.fsf@laas.fr> ( Ludovic Courtès's message of "Wed, 14 Dec 2005 11:13:59 +0100")

ludovic.courtes@laas.fr (Ludovic Courtès) writes:

> Marius Vollmer <mvo@zagadka.de> writes:
>
>> 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.

I agree with Ludovic.  What we have now seems seriously screwy, and
I'm sorry I didn't pay attention when this was first discussed and
implemented.

(duplicate-handlers is a module??!!  And there was me thinking we
already had quite a good class system in Guile.)

It seems completely wrong for the defining module to be responsible
for guessing which of its bindings might have the same name as other
bindings in the wide world outside that module.

In particular, this gives the absurd situation where a module can be
100% correct one day, then we add a new function to core Guile, and
that same module now becomes incorrect.

I'm not saying that it's bad that users of the module suddenly get a
warning in this situation; rather that it's wrong that the only
(practical) way to fix the warning is to update the _module_'s code.
(IMO using duplicate-handlers is far too heavyweight to be practical.)

It strikes me as a much more reasonable proposition for the _using_
module to be responsible for the bindings that it imports, and the
fact that we already have #:select, #:hide and #:renamer is in line
with this.  So it seems obvious that #:replace should really be
another option for use-modules and #:use-module, _not_ for
define-module.

Am I missing something?  I can't see any good arguments for the
current interface.

Regards,
        Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2005-12-28 20:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20 13:09 [PATCH] SRFI-34, SRFI-60 and core bindings Ludovic Courtès
2005-10-20 19:42 ` Kevin Ryde
2005-10-21  7:52   ` Ludovic Courtès
2005-10-21 20:36     ` Kevin Ryde
2005-10-24  8:10       ` Ludovic Courtès
2005-12-06 23:23 ` Marius Vollmer
2005-12-07 10:10   ` Ludovic Courtès
2005-12-13 21:55     ` Marius Vollmer
2005-12-14 10:13       ` Ludovic Courtès
2005-12-28 20:14         ` Neil Jerram [this message]
2006-01-03 10:06           ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bqz1j7x0.fsf@ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).