Hello,

As you probably know, Guile is fairly flexible when dealing with
duplicate bindings -- one can warn, error, choose the last one, first
one, etc.

But currently there are lots of warnings, way too many. For example just
using srfi-69 gives you a warning:

  WARNING: (guile-user): imported module (srfi srfi-69) overrides core binding 
`make-hash-table'

So I think there is confusion among both users and developers of Guile.
I thought a little about the problem and here's a kind of FAQ regarding
duplicate bindings:

  Q: I have a module that overrides a core binding (like
  make-hash-table). Should I #:export that binding or #:replace it?

  A: #:replace. Presumably the user knows what she is doing when she
  uses your module. If she really cares she can change the duplicate
  bindings resolution mechanism to disallow such imports.


  Q: How do I suppress duplicate bindings warnings?

  A: Fix your module so that you rename one of the bindings on import.


  Q: How do I suppress a "overrides core binding" warning when importing
  a module?

  A: Fix that module so that it uses #:replace for that binding instead
  of #:export.


Now, off to fix R6RS modules in this regard...

Andy
-- 
http://wingolog.org/

Reply via email to