Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!lismore!nick From: nick@lfcs.cs.edinburgh.ac.uk (Nick Rothwell) Newsgroups: comp.lang.functional Subject: Re: What is strong typing? (Was: I like strong typing) Message-ID: <5448@castle.ed.ac.uk> Date: 1 Aug 90 10:55:58 GMT References: <4387@uqcspe.cs.uq.oz.au> <1689@opal.tubopal.UUCP> <4424@uqcspe.cs.uq.oz.au> <3263@stl.stc.co.uk> Reply-To: nick@lfcs.ed.ac.uk (Nick Rothwell) Organization: Wavetables 'R' Us Lines: 21 In article <3263@stl.stc.co.uk>, tom@stl.stc.co.uk (Tom Thomson) writes: > Why should type checking be restricted to compile time? > It is perfectly possible to have strong typing which is done wholely > at run-time (any interpreter is going to behave like that). No, you can have interpreters which don't do typechecking at all. Our ML system just interprets a form of untyped language calculus. Why is typechecking an issue connected to interpretation? > Currently most systems do some type checking at run time: what is a > divide-by-zero eroor trap except a type failure indication from the hardware? 0 is an integer, just like 17 is. Milner-style typechecking is structural, so it knows about, say, integers, but not about positive integers, primes, and non-structural entities of this kind. -- Nick Rothwell, Laboratory for Foundations of Computer Science, Edinburgh. nick@lfcs.ed.ac.uk !mcsun!ukc!lfcs!nick ~ ~~ ~~ ~~ ~~ Hey, son, get that DeLorean off the track! And ~~ ~~ ~~ ~~ ~ what have you done with all my lovely harpsichords?