guile-devel
[Top][All Lists]
Advanced

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

Re: When to use SCM_DEFINE vs SCM_GPROC vs SCM_PRIMITIVE_GENERIC?


From: Mark H Weaver
Subject: Re: When to use SCM_DEFINE vs SCM_GPROC vs SCM_PRIMITIVE_GENERIC?
Date: Sat, 29 Jan 2011 10:39:47 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Andy Wingo <address@hidden> writes:
> And I don't recall the practical difference between GPROC and
> PRIMITIVE_GENERIC.

I found the answer.  According to a commit message by Mikael Djurfeldt
in 2003, all uses of SCM_GPROC should be converted to use
SCM_PRIMITIVE_GENERIC.

  http://blog.gmane.org/gmane.lisp.guile.cvs/month=20030301

I will do this for all extensible functions in numbers.c.  I will also
make some other numeric functions extensible.  For example, it occurs to
me if we make `inf?', `nan?', and `finite?' extensible, then users will
be able to easily extend them to handle non-real complex values, if
desired.

    Best,
     Mark



reply via email to

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