chicken-janitors
[Top][All Lists]
Advanced

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

[Chicken-janitors] Re: #122: tinyclos generic mechanism gets confused by


From: Chicken Trac
Subject: [Chicken-janitors] Re: #122: tinyclos generic mechanism gets confused by a surplus of arguments.
Date: Sun, 15 Nov 2009 17:11:50 -0000

#122: tinyclos generic mechanism gets confused by a surplus of arguments.
-------------------------------+--------------------------------------------
 Reporter:  tonysidaway        |       Owner:       
     Type:  defect             |      Status:  new  
 Priority:  major              |   Milestone:       
Component:  extensions         |     Version:  4.2.x
 Keywords:  tinyclos generics  |  
-------------------------------+--------------------------------------------

Comment(by tonysidaway):

 To clarify, the generic dispatch mechanism should identify the call as one
 for which it has no applicable methods.  It should not call a method
 unless that method is specified so as to accept the argument list
 presented.

 Here's an example of the desired behavior as seen in another system based
 on tinyclos.  The define-method syntax is slightly different but it's
 basically the same code.

 stklos> (define-generic G)
 ;; g
 stklos> (define-method G((a <integer>)) (+ a a))
 ;; g
 stklos> (G 1)
 2
 stklos> (G 1 2)
 **** Error:
 error: no applicable method for #[<generic> g (1)]
 in call (g 1 2)
         (type ",help" for more information)

-- 
Ticket URL: <http://www.irp.oist.jp/trac/chicken/ticket/122#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

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