unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludovic.courtes@laas.fr (Ludovic Courtès)
Subject: Re: [PATCH] SRFI-34, SRFI-60 and core bindings
Date: Fri, 21 Oct 2005 09:52:26 +0200	[thread overview]
Message-ID: <87fyqvgvd1.fsf@laas.fr> (raw)
In-Reply-To: <87sluw9dqa.fsf@zip.com.au> (Kevin Ryde's message of "Fri, 21 Oct 2005 05:42:53 +1000")

Kevin Ryde <user42@zip.com.au> writes:

> I don't really want to silently replace the core bit-count, the
> srfi-60 one is completely different.  It's pretty annoying to get a
> warning or have to use #:renamer, but I don't know a better way.

`#:replace' _is_ this better way: it does _not_ override the core
binding, unlike `(use-modules (srfi srfi-60))' (with no renamer) in the
current state.  What it does is that is replaces this binding only
within the module user: the binding replacement is confined.

  guile> (define-module (chbouib))
  #<directory (chbouib) 30083e90>
  guile> (use-modules (srfi srfi-60))
  guile> (bit-count 2)
  1
  guile> (set-current-module (resolve-module '(guile-user)))
  #<directory (chbouib) 30083e90>
  guile> (bit-count #f (make-uniform-vector 8 #t #f))
  8

This is exactly the behavior users may expect.

> (Incidentally, `current-time' from srfi-19 is also a problem.)

Right, it also annoyed me in the past.  If we agree that `#:replace' is
the right thing, then we can do the same for this one.

Ludovic.


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


  reply	other threads:[~2005-10-21  7:52 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 [this message]
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

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