Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!lll-winken!uwm.edu!uwvax!daffy!saavik.cs.wisc.edu!quale From: quale@saavik.cs.wisc.edu (Douglas E. Quale) Newsgroups: comp.lang.misc Subject: Re: The powerlessness of Lisp Message-ID: <1991Mar28.164024.21829@daffy.cs.wisc.edu> Date: 28 Mar 91 16:40:24 GMT References: <16060:Mar2515:41:5691@kramden.acf.nyu.edu> <1991Mar26.165516.13035@daffy.cs.wisc.edu> <26146:Mar2804:56:5791@kramden.acf.nyu.edu> Sender: news@daffy.cs.wisc.edu (The News) Organization: University of Wisconsin -- Madison Lines: 68 The original challenge was so short I'll repeat it: In Common Lisp, (defun compose (f g) (lambda (&rest) (funcall f (apply g &rest)))) I think it looks better in Scheme, (define (compose f g) (lambda x (f (apply g x)))) These definitions use dynamic typing to obtain polymorphism. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ And now Dan's response: In article <26146:Mar2804:56:5791@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >Enclosed is another copy of the first article, since you didn't respond >to any of my offers via email. This qualifies you as a royal asshole, by >the way. Also enclosed for completeness are references to your first two >articles implying that my compose() didn't work, and, just in case, one >of the intermediate articles that you lied about. Probably mail isn't working on this machine correctly. I bear some responsibility for that, but I am content to let the judgement of which of us is a royal asshole to the readers of this newsgroup. > >The interested reader (I doubt there are any) will note that my >compose() nests properly, while Doug has said repeatedly that it >doesn't. As I recall, he also claims to have been reading comp.lang.misc >for more than three months. > >> You bristle when asked for any evidence that what you're saying isn't just >> hot air. > >Yes, I do, as the challenges come from a perverting pain in the butt. >I don't believe I have left any of your ``questions'' unanswered; I do >hope that you learn some civility before you have the nerve to show your >userid again in this newsgroup. If you claim once more that my compose() >doesn't nest properly, or that I have been reticent in providing >evidence that it does, I will feel no compunction in thrashing you in >public for the next twenty mistakes you make. Don't take this as a >threat, though; I don't want you to tell the truth until you understand >that it really is the truth. > >---Dan And Dan gives a pathetic attempt to code compose in C. Naturally his compose is not polymorphic, a key advantage of dynamic typing that was the whole point of this exercise. That point was specifically mentioned in the challenge since I figured Dan would try to worm out of it -- support for genericity is weak in C. As a parting thought, how long is Dan's nonpolymorphic compose compared to the fully polymorphic lisp versions? Seems like his code is infinitely less capable and well over three times longer. What a surprise. Go ahead Dan. Thrash me in public. You'll only make more of an ass of yourself than you already have, if that's possible. I'm still waiting for a polymorphic compose in C. That was quite clear in my post, but I'm saying it again since you seem to have trouble with English. -- Doug Quale quale@saavik.cs.wisc.edu