From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9cccf6ef6149fdaa X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Operators -> unit analysis Date: 2000/01/07 Message-ID: #1/1 X-Deja-AN: 569601050 References: <38620350.48F8FC08@gecm.com> <83u8l0$5i5$1@nnrp1.deja.com> <84rd2f$snm$1@nntp3.atl.mindspring.net> <84thof$9r3$1@nntp4.atl.mindspring.net> <387383D0.4EA02E95@earthlink.net> <850jiq$mad$1@nnrp1.deja.com> <3874D0BE.82F04763@Raytheon.com> <853lkg$tgj$1@nnrp1.deja.com> <854va4$prk$1@nnrp1.deja.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 947263611 228 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-01-07T00:00:00+00:00 List-Id: On Fri, 7 Jan 2000, Ted Dennison wrote: > In article <853lkg$tgj$1@nnrp1.deja.com>, > Robert Dewar wrote: > > In article <3874D0BE.82F04763@Raytheon.com>, > > > Algol-68 designers regard it as a horrible mistake. One should > > only rely on precedence of operators where the precedence rules > > are clear and obvious. This cannot be the case by definition > > for user defined precedences. > > I think you are saying that in practice it gets to be a mess. I do > appreciate that. But the above statement would only be true if they are > truly user-defined. If the operators and precedences are in fact created > by the user to match existing precedences for established mathematical > notations, then I think it *would* be clear and obvious to any user. For > instance, if I make a notation including operators to mimic BNF > productions (which I am doing, btw), any reasonable user would expect to > *not* have to put parenthesis around a production's right side just to > keep the BNF "::=" operator from being evaluated prematurely. Ted, if this is what you are trying to do, you should take a look at a "functional" programming language, like ML or Haskell. These languages allow user defined infix operators, and the example you describe is well studied in that community. -- Brian