Path: utzoo!attcan!uunet!snorkelwacker!ai-lab!zurich.ai.mit.edu!markf From: markf@zurich.ai.mit.edu (Mark Friedman) Newsgroups: comp.lang.scheme Subject: Re: Scheme is unnecessarily biased towards lists Message-ID: Date: 24 Sep 90 15:28:48 GMT References: <9009200822.AA02949@vis.> Sender: news@ai.mit.edu Reply-To: markf@zurich.ai.mit.edu Organization: M.I.T. Artificial Intelligence Lab. Lines: 29 In-reply-to: peter@ficc.ferranti.com's message of 22 Sep 90 15:47:11 GMT In article peter@ficc.ferranti.com (Peter da Silva) writes: In article markf@zurich.ai.mit.edu writes: > As Thomas Breuel corrected me, my example for generic dispatch of > (set! + ... (apply + addends)))) > ought to have been: > (let ((old-+ +)) > (set! + ... (apply old-+ addends))))) Back to the point, your example needs more work. What if you're adding objects of the old and the new numeric types? Of course it needs more work! I was just showing a simple example of a Scheme approach to genericity. If your needs are more complex the mechanism will be more complex. The basic approach of explicit type checking and redefinition is, I think, still valid. -Mark -- Mark Friedman MIT Artificial Intelligence Lab 545 Technology Sq. Cambridge, Ma. 02139 markf@zurich.ai.mit.edu