Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!hookup!news.moneng.mei.com!uwm.edu!math.ohio-state.edu!jussieu.fr!oleane!pipex!lyra.csx.cam.ac.uk!warwick!bsmail!miki!jwl
From: jwl@miki.cs.bris.ac.uk (John Lloyd)
Subject: Re: meta-programming, strong typing, and monads
Message-ID: <D0155o.HvA@info.bris.ac.uk>
Sender: jwl@miki (John Lloyd)
Nntp-Posting-Host: miki.cs.bris.ac.uk
Organization: Unviversity of Bristol, Dept of Computer Science
References: <CztzuC.H1w@info.bris.ac.uk> <3bck5l$ph9@hitchcock.dfki.uni-sb.de>
Date: Tue, 29 Nov 1994 12:53:48 GMT
Lines: 50

In article <3bck5l$ph9@hitchcock.dfki.uni-sb.de>, vanroy@dfki.uni-sb.de 
(Peter Van Roy) writes:
 
|> My original question has still NOT been answered.  I think this is a legitimate
|> research issue: can one design a language that provides the advantages of a
|> strongly-typed language, while being as amenable to source transformations as
|> Prolog?  Fernando's solution is usable, but not good enough, since it requires
|> too much extraneous knowledge to be a daily tool.  Is true transparency 
|> possible?

This sounds like a good point to pursue. If I understand Peter's point, it 
is that strongly typed languages get in the way of implementing programs
which do source-to-source transformations.

But first I would like to clarify some points. Maybe I missed an earlier 
posting, but I am rather confused about the concept of "dynamic typing" and
would appreciate it if someone could enlighten me. However, just in case 
someone isn't to sure exactly what "strong typing" means (at least to me!), 
here is a definition:

A programming language is strongly typed if every symbol and its type must 
be specified in the program by a language declaration.

A symbol is a constant, function, proposition, or predicate, but not a
variable. So, for example, Goedel is a strongly typed language. In the 
functional programming community, the term "strong typing" is used in the 
slightly weaker sense that each symbol *has* a declaration, but it may be 
inferred rather than given by the programmer. So Miranda and Haskell are
strongly typed in this weaker sense.

But what does "dynamic typing" mean? It can't mean Prolog, which has no
type system at all, and I can't think of any other plausible candidate.
Can someone help out?

Now going back to Peter's point above, let's try to make the debate more 
specific. Goedel is a strongly typed language and we already have a fair
amount of code doing program transformation tasks (including a full-scale
partial evaluator - SAGE). Our experience is that the type system rarely 
gets in the way and, in fact, on balance contributes significantly to 
writing this kind of program. So my question is:

Can someone provide some concrete cases where a strong type system in a 
language such as Goedel gets in the way to a significant degree for this 
kind of task? 

There must be enough Goedel programmers out there by now to get some 
response to this query. If so, we should be able to see more clearly 
what's at stake here.

John Lloyd
