🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3664

Re: Dynamic typing (part 3)

#3664
From: Mark VandeWettering
Date: Thu, 25 Apr 1991 16:53
29 lines
1866 bytes
In article <1707@optima.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman) writes:
>In article  <1991Apr9.110217.10963@mathrt0.math.chalmers.se> Lennart Augustsson writes:
>]In article <1593@optima.cs.arizona.edu> gudeman@cs.arizona.edu (David Gudeman) writes:
>]  map f [] = []
>]  map f (x:xs) = f x : map f xs

>I'm getting really tired of pointing this out: the program above does
>not have the full generality of the mathematical or the dynamically
>typed version.  This is a point I've made several times on several
>Haskell and ML programs, and I wish people would get the idea so I
>could stop repeating myself.  The statically typed program only works
>on structures in which all elements have the same type -- and only
>when the compiler can infer that type.

Well, in a language with strong typing, the function f has a particular 
type (alpha -> beta).  It doesn't make sense to have a function which 
applies to more than a single type.

Note: I do understand the motivations for weak (you may call it dynamic if
you like) typing.   There are many distinct advantages to both side.

>Type inference has some nice features, but it does _not_ give you the
>expressive power of dynamic typing.

Hard statement to prove, and almost meaningless.  Does it mean you can't
express the same programs?  In the same or fewer lines of code?  On what
kind of an example....

Mark
Technical Details
Message-ID: <1991Apr25.165342.14354@pixar.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!ispd-newsserver!kodak!uupsi!pixar!markv
References: <1707@optima.cs.arizona.edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.misc
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!ispd-newsserver!kodak!uupsi!pixar!markv
From: markv@pixar.com (Mark VandeWettering)
Subject: Re: Dynamic typing (part 3)
Message-ID: <1991Apr25.165342.14354@pixar.com>
Sender: news@pixar.com (Usenet Newsmaster)
Nntp-Posting-Host: woody
Organization: Pixar -- Point Richmond, California
References: <1707@optima.cs.arizona.edu>
Date: Thu, 25 Apr 1991 16:53:42 GMT