guile-user
[Top][All Lists]
Advanced

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

Re: minimalist guile


From: Andy Wingo
Subject: Re: minimalist guile
Date: Mon, 19 Jun 2006 11:36:59 +0200

Hi,

On Sun, 2006-06-18 at 15:07 +0200, Mildred wrote:
> > $ guile
> > guile>
> > Display all 1900 possibilities? (y or n)
> 
> Isn't that too much ?

I think so too. A historical artifact that someone should clean up,
although the compatibility headaches will be many :)

>       ((myobject 'mymethod) parameters ...)
> 
> I prefer that to
> 
>       (myclass-mymethod myobject parameters ...)

The existence of generic functions should already be known to you. When
I first started programming this way it felt very awkward to me as well.
However if you think about it, what you have is a noun and a verb -- the
way the verb works depends on the noun (or nouns in this case) that it
operates on. Whether this mapping between verbs, nouns (objects), and
types is done by looking up a table on the generic function or on the
object does not change the semantics of the operation. The space of
available noun-verb combinations is restrained either way.

In fact, the operation-space "footprint" of a method of a generic
function is smaller, because it can specialize on all arguments.

Regards,
-- 
Andy Wingo
http://wingolog.org/





reply via email to

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