Kevin Ryde <[EMAIL PROTECTED]> 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 via email to