From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: primitive-generics are limited in their arities Date: Sat, 12 Jul 2003 11:25:52 +0100 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <20030712102552.GA4329@lark> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1058189614 28537 80.91.224.249 (14 Jul 2003 13:33:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Jul 2003 13:33:34 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Jul 14 15:33:28 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19c3QD-0007G3-00 for ; Mon, 14 Jul 2003 15:31:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19c3QB-0006as-8d for guile-devel@m.gmane.org; Mon, 14 Jul 2003 09:31:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19c3OS-0005xK-An for guile-devel@gnu.org; Mon, 14 Jul 2003 09:29:28 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19c3OP-0005vN-LJ for guile-devel@gnu.org; Mon, 14 Jul 2003 09:29:26 -0400 Original-Received: from rdu162-226-006.nc.rr.com ([24.162.226.6] helo=fridge) by monty-python.gnu.org with esmtp (Exim 4.20) id 19c3Ms-0005HA-Bw for guile-devel@gnu.org; Mon, 14 Jul 2003 09:27:50 -0400 Original-Received: from lark (mantis.schoolnet.na [::ffff:196.44.140.238]) (AUTH: LOGIN wingo) by fridge with esmtp; Mon, 14 Jul 2003 09:27:41 -0400 Original-Received: from wingo by lark with local (Exim 3.36 #1 (Debian)) id 19bHZg-0003Pn-00 for ; Sat, 12 Jul 2003 11:25:52 +0100 Original-To: guile-devel@gnu.org Mail-Followup-To: guile-devel@gnu.org Content-Disposition: inline X-Operating-System: Linux lark 2.4.20-1-686 User-Agent: Mutt/1.5.4i X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2623 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2623 Hey goops hackers, I've run into an irritating little bug in primitive-generics where they are limited to a specific arity. Here's a little example. guile> (use-modules (oop goops)) guile> (define-method (write (foo ) (bar ) (baz )) ... (display (list foo bar baz))(newline)) guile> (write '(4 5 6) '(6 7) '(5 6)) Backtrace: In current input: 4: 0* [write (4 5 6) (6 7) (5 6)] :4:1: In procedure write in expression (write (quote #) (quote #) ...): :4:1: Wrong number of arguments to # ABORT: (wrong-number-of-args) guile> write $1 = # guile> (primitive-generic-generic write) $2 = #< write (7)> guile> ($2 '(4 5 6) '(6 7) '(5 6)) ((4 5 6) (6 7) (5 6)) I wonder if this is a problem with the primitive-generic support or if there's something that I'm doing wrong. It seems unnatural to have to (define-method write ...) and then (set! write (primitive-generic-generic write)) I tried to look into a fix but I got lost. What's the word on this? Thanks for the help, wingo. _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel