Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!swrinde!gatech!news.mathworks.com!newshost.marcam.com!uunet!in1.uu.net!allegra!alice!pereira
From: pereira@alta.research.att.com (Fernando Pereira)
Subject: Re: Prolog syntax
In-Reply-To: fjh@munta.cs.mu.OZ.AU's message of Sat, 29 Apr 1995 08:44:40 GMT
X-Nntp-Posting-Host: alta.research.att.com
Message-ID: <PEREIRA.95Apr29145521@alta.research.att.com>
Sender: usenet@research.att.com (netnews <9149-80593> 0112740)
Reply-To: pereira@research.att.com
Organization: AT&T Bell Laboratories
References: <9511221.23905@mulga.cs.mu.OZ.AU> <3nkjnc$q0o@goanna.cs.rmit.edu.au>
	<9511918.22753@mulga.cs.mu.OZ.AU>
Date: Sat, 29 Apr 1995 18:55:21 GMT
Lines: 36

In article <9511918.22753@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:
   I didn't mean to say that Prolog syntax wasn't much good, although
   I see how my words could be interpreted as such - I meant to say
   that it didn't _seem_ to be much good (that's the trouble with
   ambiguous natural-language grammars like English ;-).
   The fact that it didn't seem much good was a little suprising to me,
   since I think the people who designed it were no fools.
I was around Prolog at the time, although the syntax was David
Warren's design and I don't know the reasons for all his choices. I
believe the main reason for the treatment of operators was
orthogonality: any atom can be made an operator, and the syntactic
analysis of a given string can be given by simple rules. The 
exceptional treatment of quoted atoms you propose would complicate the
syntax rules, both for the user and the parser. In addition, operator
precedence and left-corner parsing fit very well, allowing a simple
and efficient parser to be written. That may not be relevant from a
``human engineering'' point of view, but there's a view of the
programming world that formal simplicity has ultimately greater value
than perceptual/cognitive criteria. We may disagree about this, but I
believe you must agree that the ``de facto'' syntax is more uniform
and has a simpler (in the sense of grammar size) grammar.

The funny thing is that in over 18 years of using the de facto syntax,
I would place problems with it in the noise as a source of programming
problems. In contrast, I still sometimes get in trouble with C syntax
especially when macro expansion is involved, even though I've been
using C as least as often as Prolog in the last 15 years.
--
Fernando Pereira
2B-441, AT&T Bell Laboratories
600 Mountain Ave, PO Box 636
Murray Hill, NJ 07974-0636
pereira@research.att.com
1-908-582-3980


