Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.alpha.net!uwm.edu!vixen.cso.uiuc.edu!howland.reston.ans.net!pipex!uknet!festival!hwcee!andrew
From: andrew@cee.hw.ac.uk (Andrew Dinn)
Subject: Re: meta-programming, strong typing, and monads
Message-ID: <D02s31.E9z@cee.hw.ac.uk>
Sender: news@cee.hw.ac.uk (News Administrator)
Organization: Dept of Computing and Electrical Engineering, Heriot-Watt University
X-Newsreader: TIN [version 1.2 PL2]
References: <CztzuC.H1w@info.bris.ac.uk>  <D019tD.M91@info.bris.ac.uk>
Date: Wed, 30 Nov 1994 10:06:30 GMT
Lines: 34

John Lloyd (jwl@miki.cs.bris.ac.uk) wrote:

: OK, in this case, maybe some kind soul would be willing to clarify the 
: terminology for us by giving careful definitions of the major concepts 
: (static/dynamic, strong/weak, etc) for type systems with some illustrative 
: examples? Anyway, I do agree that the Goedel type system is static, by any
: reasonable definition of that term.

Just want to point out that the thing which distinguishes the Prolog,
Lisp and Smalltalk type systems from those of e.g. C++, Pascal is that
they the former have typed values but untyped variables, whereas the
latter have typed variables and values. I have never seen a definition
of `static' vs `dynamic' which comes close to making this distinction.

If `dynamic' is to be of any use then it must be to do with having
runtime type testing as happened in e.g. the Interlisp environment
where functions contained `dtype' opcodes to throw an error when
invoked with illegal type arguments or in Smalltalk-80 where objects
respond to methods they do not understand by throwing an error
i.e. the type-correctness of program data is validated at runtime not
define time. The reason for this is that the presence of untyped
variables and indirect linking makes define time checking impossible
in all cases.

The construction of types dynamically is a different kettle of
(rose-hued) fish again, it being perfectly feasible in a typed
environment to detect the validity of such constructions either when
the types or, rather, routines which use them are defined or when they
are executed.


Andrew Dinn
-----------
there is no map / and a compass / wouldn't help at all
