bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generic * and 0


From: Mikael Djurfeldt
Subject: Re: generic * and 0
Date: Fri, 1 Dec 2006 21:22:18 +0100

2006/12/1, Kevin Ryde <address@hidden>:
SZAVAI Gyula <address@hidden> writes:
>
> (use-modules (oop goops))
> (define-class <c> ())
> (define-method (* a (b <c>)) #t)
> (* 0 (make <c>))
> ==> 0

Thanks, that's a bug.

Are you sure?

If you want to use an operator which is common for numbers and <c>:s,
why don't you want to use a common zero?  If you don't, the behavior
of the operator will be inconsistent.

If one still don't want 0 as zero (in the abstract sense), maybe one
should use another name for the operator, or, tie a different generic
to the name "*".

M




reply via email to

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