From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.devel Subject: Re: When to use SCM_DEFINE vs SCM_GPROC vs SCM_PRIMITIVE_GENERIC? Date: Sat, 29 Jan 2011 10:39:47 -0500 Message-ID: <87sjwb3eik.fsf@yeeloong.netris.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1296315611 7633 80.91.229.12 (29 Jan 2011 15:40:11 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 29 Jan 2011 15:40:11 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 29 16:40:04 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PjCu9-0004ZE-Ow for guile-devel@m.gmane.org; Sat, 29 Jan 2011 16:40:01 +0100 Original-Received: from localhost ([127.0.0.1]:36869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjCu9-000630-CE for guile-devel@m.gmane.org; Sat, 29 Jan 2011 10:40:01 -0500 Original-Received: from [140.186.70.92] (port=45642 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjCu6-00062e-CT for guile-devel@gnu.org; Sat, 29 Jan 2011 10:39:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjCu4-00068v-WB for guile-devel@gnu.org; Sat, 29 Jan 2011 10:39:58 -0500 Original-Received: from world.peace.net ([216.204.32.208]:50216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjCu4-00068d-R3 for guile-devel@gnu.org; Sat, 29 Jan 2011 10:39:56 -0500 Original-Received: from ip68-9-118-38.ri.ri.cox.net ([68.9.118.38] helo=freedomincluded) by world.peace.net with esmtpa (Exim 4.69) (envelope-from ) id 1PjCty-000889-4f; Sat, 29 Jan 2011 10:39:50 -0500 Original-Received: from mhw by freedomincluded with local (Exim 4.69) (envelope-from ) id 1PjCtw-0007rE-5K; Sat, 29 Jan 2011 10:39:48 -0500 In-Reply-To: (Andy Wingo's message of "Fri, 28 Jan 2011 15:37:38 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 216.204.32.208 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11400 Archived-At: Andy Wingo 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