Newsgroups: comp.software-eng,comp.lang.functional,comp.lang.lisp,msu.cps.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!travelers.mail.cornell.edu!news.kei.com!simtel!news.sprintlink.net!in2.uu.net!netnews.jhuapl.edu!aplcenmp!hall
From: hall@aplcenmp.apl.jhu.edu (Marty Hall)
Subject: Re: Why typing?
Message-ID: <DF9A96.H8w@aplcenmp.apl.jhu.edu>
Organization: JHU/APL AI Lab, Hopkins P/T CS Faculty
References: <43pl5a$fok@msunews.cl.msu.edu> <43rcpn$26re@info4.rus.uni-stuttgart.de>
Date: Thu, 21 Sep 1995 12:48:41 GMT
Lines: 19
Xref: glinda.oz.cs.cmu.edu comp.software-eng:37150 comp.lang.functional:6430 comp.lang.lisp:19159

In article <43rcpn$26re@info4.rus.uni-stuttgart.de> 
ucaa2385@iris2.csv.ica.uni-stuttgart.de (Peter Hermann) writes:
>
>strong typing like e.g. in Ada is extremely beneficial [...]

Note however, that if you have strong typing but no type variables
there are certain types of constructs that cannot be expressed.
For instance, First-of-List, which takes a list of Foo objects and
returns a Foo object, where Foo can be any type. Or the Identity
function which returns its argument unchanged. Or a generalized Sort
routine which takes a vector/list of Foo objects and a predicate
(which takes 2 Foos as input and returns a Boolean) and sorts the
vector/list based on the function. All of these examples are
completely type-safe, in that they can be used in a language that
guarantees to not have type errors at runtime. But you need type
variables. I think, however, that templates ala C++ can capture many
of the cases. 
						- Marty
(proclaim '(inline skates))
