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: Tue, 5 Dec 2006 20:42:51 +0100

2006/12/5, Ludovic Courtès <address@hidden>:
It would be soooo nice if some day we could have a framework to
specialize invocations, especially for arithmetic operators (e.g., like
what CMUCL and others have)...  :-)

Well, we do have the things call "primitive generics"---i.e. most
procedures can behave as generic functions.  What is nice about the
system is that hanging methods for new classes on, for example, the
Guile arithmetic operators doesn't slow them down.

I attach a matrix library to this email as an example.  (See README.)
It seems to compile also under CVS HEAD.

However, of course things could be made much better if we could
redesign procedure invocation from bottom up, so that all primitive
procedures are true generic functions.  If so, most argument checking
logic which the C code for all Guile primitives start with could be
eliminated.

Attachment: guile-matrix-1.3.0.tar.gz
Description: GNU Zip compressed data


reply via email to

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