[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Do we have to worry about the names of generic functions?
From: |
Paul Jarc |
Subject: |
Re: Do we have to worry about the names of generic functions? |
Date: |
Sat, 15 May 2004 15:53:03 -0400 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
Andy Wingo <address@hidden> wrote:
> I'm not clear on the difference, except wrt collisions with
> non-generics, which I believe Andreas covered.
Well, he mentioned ensure-generic, but that only works on procedures.
Also suppose that I have this:
(use-modules (foo goops-module))
(use-modules (bar non-goops-module))
If both of those export the same name, then the non-goops module wins.
Which means it won't matter what the goops module did to defend
against collisions. I have to resort to using a #:renamer, because
the default names weren't distinct enough.
That said, some conflicts just can't be foreseen, and #:renamer isn't
such a big burden for those cases. (Personally, I always use an
explicit #:select to ensure I only pull in what I want, and I get no
collisions.) But I agree with Rob that names should be designed for
readability and greppability; users shouldn't have to go to extra
effort (duplicated in each dependent module) to get those benefits.
paul
Re: Do we have to worry about the names of generic functions?, Rob Browning, 2004/05/13