Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!pipex!uunet!allegra!alice!pereira
From: pereira@alta.research.att.com (Fernando Pereira)
Subject: Re: In defense of Prolog's dynamic typing
In-Reply-To: ok@goanna.cs.rmit.oz.au's message of 25 Nov 1994 19:31:48 +1100
Message-ID: <PEREIRA.94Nov25152906@alta.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Nntp-Posting-Host: alta.research.att.com
Reply-To: pereira@research.att.com
Organization: AT&T Bell Laboratories
References: <3aviu6$7dq@hitchcock.dfki.uni-sb.de>
	<PEREIRA.94Nov23222128@alta.research.att.com>
	<3b47dk$ei8@goanna.cs.rmit.oz.au>
Date: Fri, 25 Nov 1994 20:29:06 GMT
Lines: 35

In article <3b47dk$ei8@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
   pereira@alta.research.att.com (Fernando Pereira) writes:
   >And now for a final heresy. I've written lots of Prolog, and lots of
   >C. Writing the Prolog code has often been more gratifying, because
   >something is up and running much sooner. But the C programs tend to
   >have far fewer runtime bugs once they compile and link, because even
   >the lame C type system catches many type bugs that Prolog lets by.

   If "the lame C type system" is so much better than no type system, why
   didn't the eager hordes rush to a much simpler (but more powerful) type
   system that was freely available for Prolog?  I am not talking about the
   crippling type system of Turbo whatsit, but about something very close to
   ML.  You only have to write, and type check, one version of append/3.  Even
   DCG rules can be (and were) checked by this system.

   Fernando, what was *your* problem with the DEC-10 Prolog type checker?
   What did you need to have it do that it didn't do?

That wasn't my point. I don't write C *because* of its type system, I
write C for performance reasons. What I was observing was the
true-life experience of having even a poor type system catch so many
errors that the remaining runtime debugging needed was minimal (of
course this needs careful type-oriented program design to start with).

I have no criticisms of your type system. I would probably have used
it if it was more closely integrated into the Prolog systems I use and
if I were not so lazy. Type-oblivious programming *is* very seductive,
as various posters pointed out. 

--
Fernando Pereira
2D-447, AT&T Bell Laboratories
600 Mountain Ave, PO Box 636
Murray Hill, NJ 07974-0636
pereira@research.att.com
