[Top][All Lists]
[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: |
Fri, 21 Oct 2005 09:52:26 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Kevin Ryde <address@hidden> 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.