guile-user
[Top][All Lists]
Advanced

[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: Andreas Rottmann
Subject: Re: Do we have to worry about the names of generic functions?
Date: Wed, 12 May 2004 22:34:49 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

address@hidden (Paul Jarc) writes:

> Andy Wingo <address@hidden> wrote:
>> Consider a generic, `output'. I assert that x.output() in Python does
>> not clobber the namespace.
>
> Agreed, because that name exists only within "x.".
>
>> If output is a bound method, that means it will be invoked as
>> output(x) -- exactly the same as (output x) in guile.
>
> Not exactly - generics sharing the same name don't conflict with each
> other, but they can conflict with non-generics.  (AIUI; my
> understanding of GOOPS is rather limited.)
>
Yes, but when the non-generic are procedures, you can "upgrade" them:

(define quit (ensure-generic quit))

Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Make free software, not war!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]