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

Hi,

Neil Jerram <neil@ossau.uklinux.net> writes:

> 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.

I disagree.  The set of core bindings is not supposed to be very large,
and it's not that hard to see whether you're overriding a core binding.
Given that, that doesn't seem too much of a burden for the defining
module to explicitly warn its users (via `#:replace') of its intention
to override a core binding.

> 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 don't think this is an issue, practically.  Theoretically, that should
_not_ be an issue because we should try to keep the set of core bindings
as small as possible IMO.

> 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.

In a way, this is already what happens:

1. The defining module provides a /hint/ about purposefully overridden
   bindings, via a `#:replace' option to `define-module';

2. The using module is /free/ to take such hints into account; by
   default, it will do so, because it will be using the `replace'
   duplicate binding handling policy (see the recent additions to the
   manual in HEAD).

My conclusion is that the current interface is actually quite good.  It
just needs to be well documented.  :-)

Thanks, and best wishes!

Ludovic.


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


      reply	other threads:[~2006-01-03 10:06 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
2006-01-03 10:06           ` Ludovic Courtès [this message]

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=87mzid7hig.fsf@laas.fr \
    --to=ludovic.courtes@laas.fr \
    --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).