Article View: comp.lang.misc
Article #3222Re: Dynamic typing (part 3)
From: Douglas E. Quale
Date: Wed, 27 Mar 1991 16:13
Date: Wed, 27 Mar 1991 16:13
23 lines
1075 bytes
1075 bytes
>typed languages are generally half to a tenth the size of programs in >statically typed languages" Dan Bernstein reasonably writes back. > >] I don't believe you. Give an example. > 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. I think it would take at least two orders of magnitude (probably three) to do this in C. -- Doug Quale quale@saavik.cs.wisc.edu
Technical Details
Message-ID:
<1991Mar27.161304.17666@daffy.cs.wisc.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!uwvax!daffy!saavik.cs.wisc.edu!qualeReferences:
<602@optima.cs.arizona.edu> <2400035@otter.hpl.hp.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!uwvax!daffy!saavik.cs.wisc.edu!quale From: quale@saavik.cs.wisc.edu (Douglas E. Quale) Newsgroups: comp.lang.misc Subject: Re: Dynamic typing (part 3) Message-ID: <1991Mar27.161304.17666@daffy.cs.wisc.edu> Date: 27 Mar 91 16:13:04 GMT References: <602@optima.cs.arizona.edu> <2400035@otter.hpl.hp.com> Sender: news@daffy.cs.wisc.edu (The News) Organization: University of Wisconsin -- Madison Lines: 23