🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #1524

distfix and parentheses (was: postfix operators - does anyone need them?)

#1524
From: Takashi Chikayama
Date: Thu, 01 Oct 1992 03:21
26 lines
1770 bytes
In article <1992Sep30.205620.5130@quintus.com>
	pds@quintus.com (Peter D. Schachte) writes:

 |The advantage of a formalized distfix syntax extension is the same as
 |the advantage of formalized bracketing:  error detection.

Their merits are not limited to error detection.

 |For example,
 |if you wanted to add if-then-elseif-then-else-endif syntax to Prolog,
 |you could declare each of these words as an operator of the appropriate
 |precedence.

But no precedence selection can make nested if-then-else-endif valid,
as "then" and "else" cannot be declared "yfy".  On the other hand,
this can be made possible by making "if-endif" as a parentheses pair,
or probably by distfix.  In general, they give more freedom to syntax
design.

My point is that the principal difference between distfix and
parentheses is in error detection, not in the extent of such added
freedom.  As parse time error detection cannot be perfect anyway, I
think introducing parentheses would be enough.

Takashi Chikayama
ICOT
Technical Details
Message-ID: <CHIK.92Oct1122159@ss38.icot.or.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!yale!yale.edu!think.com!ames!sun-barr!sh.wide!wnoc-tyo-news!icot32!ss151.icot.or.jp!ss151!chik
References: <BusC69.MpE@gabriel.keele.ac.uk> <CHIK.92Sep22103654@ss38.icot.or.jp> <1992Sep30.205620.5130@quintus.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!yale!yale.edu!think.com!ames!sun-barr!sh.wide!wnoc-tyo-news!icot32!ss151.icot.or.jp!ss151!chik
From: chik@icot.or.jp (Takashi Chikayama)
Newsgroups: comp.lang.prolog
Subject: distfix and parentheses (was: postfix operators - does anyone need them?)
Message-ID: <CHIK.92Oct1122159@ss38.icot.or.jp>
Date: 1 Oct 92 03:21:59 GMT
References: <BusC69.MpE@gabriel.keele.ac.uk>
 <CHIK.92Sep22103654@ss38.icot.or.jp>
 <1992Sep30.205620.5130@quintus.com>
Sender: news@ss151.icot.or.jp
Reply-To: chikayama@icot.or.jp
Organization: Institute for New Generation Computer Technology, Tokyo, Japan.
Lines: 26
In-Reply-To: pds@quintus.com's message of 30 Sep 92 20: 56:20 GMT