Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!henry From: henry@utzoo.UUCP (Henry Spencer) Newsgroups: comp.lang.c Subject: Re: Two replacements for unary + Message-ID: <7939@utzoo.UUCP> Date: Mon, 20-Apr-87 11:28:03 EST Article-I.D.: utzoo.7939 Posted: Mon Apr 20 11:28:03 1987 Date-Received: Mon, 20-Apr-87 11:28:03 EST References: <489@danews.ATT.COM> <2419@ulysses.homer.nj.att.com>, <1108@ius2.cs.cmu.edu> Organization: U of Toronto Zoology Lines: 20 > Comment: the ANSI proposed unary + has the added semantic of enforcing > parenthesis ordering. > > Question: does the unary - have the added semantics of enforcing parenthesis > ordering? In at least one draft it did; ugh. Fortunately, it doesn't now. > If not, doesn't this add some non-orthogonality to the the unary + and -? Well, yeah, but orthogonality is in the eye of the beholder. The properties of binary + and - are distinctly different (e.g. - is not associative), so expecting orthogonality from the unary operators may be a bit much. If you want real orthogonality, consider something that occurred to me some years ago: the "right" meaning of unary + is "absolute value"! (Yes, I do realize that there are practical reasons not to do this...) -- "If you want PL/I, you know Henry Spencer @ U of Toronto Zoology where to find it." -- DMR {allegra,ihnp4,decvax,pyramid}!utzoo!henry