[Top][All Lists]

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

Re: guile-1.5.1 and deprecated ...

From: Rob Browning
Subject: Re: guile-1.5.1 and deprecated ...
Date: Wed, 29 Aug 2001 22:34:43 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

Marius Vollmer <address@hidden> writes:

> I don't really like the behavior of `define-method' either where it
> defines a new empty generic if one doesn't already exist.

Now that I understand the situation.  Me neither.

> I always define the generic explicitely with `define-generic' before
> adding methods to it.  This gives a natural place to document the
> general meaning of the generic function, and the protocol it might
> belong to.

I think I'm going to adopt this habit too.  It makes it far clearer to
me what's really going on.

I think I would have preferred a function that has a syntax more like
define-method, but does what add-method!  does.  So you could say:

  (define-generic foo)
  (new-method (foo (x <integer)) ...)

and still have the convenient syntax but wouldn't be able to
accidentally forget the define-generic call.

Rob Browning
rlb,, and
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD

reply via email to

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