Newsgroups: comp.lang.prolog
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!newsfeed.pitt.edu!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 Tue, 25 Apr 1995 05:43:21 GMT
X-Nntp-Posting-Host: alta.research.att.com
Message-ID: <PEREIRA.95Apr26222051@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> <PEREIRA.95Apr22162433@alta.research.att.com>
	<9511515.14215@mulga.cs.mu.OZ.AU>
Date: Thu, 27 Apr 1995 02:20:51 GMT
Lines: 38

In article <9511515.14215@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus Henderson) writes:
   pereira@alta.research.att.com (Fernando Pereira) writes:

   >The Edinburgh Prolog term readers and others derived from them always
   >had the behavior you deplore. [...]
   >I don't have the draft standard handy, but the behavior you deplore
   >doesn't seerm to have caused serious problems before, and it's in fact
   >quite convenient in many contexts.

   Personally, I consider the fact that 

	   X = ';'

   is a syntax error to be a serious problem.
   I don't see any convenience at all in allowing quoted operators
   to retain their operator status.

The principle here is syntactic modularity (separation of
concerns). The job of '...' is to allow atoms or functors with name
..., independently of whether ... is lexically a constant. Overloading
'' to also remove operator properties will be confusing (as most
overloading is). Furthermore, it precludes using operators with names
that do not tokenize as constants withut the quotes. For instance, in
manipulating linear logic terms I might like to have

	:- op(..., yfx, '-o').

which will be more understandable to other people familiar with LL
than something like -* or -@. 
--
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


