Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!munnari!kre From: kre@munnari.oz (Robert Elz) Newsgroups: comp.mail.uucp Subject: Re: Say "preference" rather than "precedence" in network addresses Message-ID: <1770@munnari.oz> Date: Wed, 5-Aug-87 12:15:44 EDT Article-I.D.: munnari.1770 Posted: Wed Aug 5 12:15:44 1987 Date-Received: Sat, 8-Aug-87 02:25:43 EDT References: <112@stargate.UUCP> <908@bsu-cs.UUCP> Organization: Comp Sci, Melbourne Uni, Australia Lines: 41 Summary: "precedence" is not misused in addressing discussions In article <908@bsu-cs.UUCP>, dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: > The quoted use of the term "precedence" is frequently used to mean that > when a mailer sees a construct of the form a!b@c it groups it as > (a!b)@c rather than a!(b@c). > ... > This, ... would imply that a+b*c would > be grouped as (a+b)*c rather than as a+(b*c), which is wrong. No, that's not quite right. In both mathematics, and network address parsing, "precedence" implies ordering of the operations, highest precedence means "do it first". In mathematics, parentheses can be used to force precedence to a particular operator or expression, so its entirely sensible to write "a+(b*c)" if that's what you prefer (or "(a+b)*c" if that's what you mean). In mail headers, parentheses mean comments, so its totally absurd to write "h!u@d" as "h!(u@d)" or "(h!u)@d". Nor is it sensible to use those forms in any kind of analogy with mathematics. Just think of precedence as "do it first" and apply that to the address, in order to "do" a network address operator, you (notionally at least) send the mail to the indicated host (rhs or lhs as appropriate), and pass it the other operand to interpret locally. With this definition, its entirely reasonable to claim that @ should have higher precedence than ! .. it just means that you should "do" the '@' first. This is totally consistent with mathematics where '*' having higher precedence than '+' means that you "do" the '*' first. I suspect that where the confusion arises, is that the operands of mathematical operators are numbers, and that's all (anything else must be reducible to a number). In net addresses the two operands are strings, one a "host" and the other "local information", and each of those contains all of the characters on the appropriate side of the operator (not just those out as far as some other operator, there isn't even a standard set of operators). Robert Elz