Newsgroups: comp.software-eng,comp.lang.functional,comp.lang.lisp,msu.cps.misc
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.sprintlink.net!tank.news.pipex.net!pipex!uknet!newsfeed.ed.ac.uk!dcs.ed.ac.uk!cnews
From: Thorsten Altenkirch <alti@dcs.ed.ac.uk>
Subject: Re: Why typing?
In-Reply-To: Erik Naggum's message of 25 Sep 1995 16:39:42 +0000
X-Nntp-Posting-Host: baleshare.dcs.ed.ac.uk
Message-ID: <ALTI.95Sep28143029@baleshare.dcs.ed.ac.uk>
Sender: cnews@dcs.ed.ac.uk (UseNet News Admin)
Organization: LFCS, Edinburgh
References: <43pl5a$fok@msunews.cl.msu.edu> <43rc73$ala@info.epfl.ch>
	<43t0gq$b5f@ornews.intel.com> <43uip5$is1@newshost.lanl.gov>
	<440ae2$sf0@larry.rice.edu> <446dms$r34@quabbin.crl.dec.com>
	<19950925T163942Z@naggum.no>
Date: Thu, 28 Sep 1995 13:30:28 GMT
Lines: 49
Xref: glinda.oz.cs.cmu.edu comp.software-eng:37411 comp.lang.functional:6488 comp.lang.lisp:19249

Erik Naggum writes:
In article <19950925T163942Z@naggum.no> Erik Naggum <erik@naggum.no> writes:

nikhil> [R.S. Nikhil] | Yes, in Lisp you cannot mis-apply a primitive
nikhil> but, for me, safety also | implies never mis-applying
nikhil> user-defined functions.  Without this | guarantee, I'd be
nikhil> hard-pressed to concede that Lisp is a type-safe | language.

erik> this doesn't make sense.

It does make sense to me. In LISP you make get a run-time error for
applying "+" to a list. In ML this can never happen. 

nikhil> | To take a specific example: if a point in space is
nikhil> represented as a | pair of numbers, then the typical Lisp
nikhil> function that selects the | x-coordinate: | | (define (x-coord
nikhil> pt) (car pt)) | | will happily work with any list I give it,
nikhil> whereas in most statically | typed languages, this
nikhil> mis-application is caught during type-checking.

erik> sorry, you're seriously confused.  first of all, the above code
erik> is Scheme, not Lisp. 

I think rather you are confused. Scheme is a LISP dialect, there is
actually quite a number of them. Or do you confuse LISP and Common Lisp?

erik>  second, if you use a primitive type to
erik> implement a higher-level type and you don't tell the type
erik> system, you get exactly the same kind of behavior in statically
erik> typed languages.

It is certainly a good idea to use structures but this wasn't the point.

nikhil> | The fact that Lisp has a ``safety-net'' (not present in C
nikhil> and | assembler) in that primitives are never mis-applied, is
nikhil> very useful and | nice, but I still wouldn't call it a
nikhil> type-safe language.

erik> that's because you have misunderstood Lisp's safety-net, confuse
erik> Scheme with Lisp, and generally talk more than you should.

I find the combination of arrogance and ignorance you display rather
shocking. I have to say that the discussion in comp.lang.functional is
usually on a higher level, but then this is a crossposting...



-- 
Thorsten Altenkirch	LFCS, University of Edinburgh
