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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3b9cb18e1220c16c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-07 06:58:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: Where did /= come from? Date: 7 Nov 2002 06:58:04 -0800 Organization: http://groups.google.com/ Message-ID: <4519e058.0211070658.20c730a4@posting.google.com> References: <3DC93F8B.9E28FD15@mmm.com> NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1036681084 10000 127.0.0.1 (7 Nov 2002 14:58:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 7 Nov 2002 14:58:04 GMT Xref: archiver1.google.com comp.lang.ada:30529 Date: 2002-11-07T14:58:04+00:00 List-Id: "Matthew Baulch" wrote in message news:... > I'm not advocating C when I say this, but != makes far more sense than /= > lexically speaking. In C, the Negative of a bool is retrieved with !foo. In C, that's a very true statement, for both the reason you mention, and because "/=" is actually a valid shortcut division operator, as I recently discovered to my sorrow. In Ada, it is *not* a true statement. > In Ada, not foo. So I believe that K&R got it right using the != operator > for 'not equal'. Ada on the other hand doesn't use the ! operator and "not > equal" is too clumsy so it could be far worse than '/='. K&R certianly got it right for C. However, that decision was based on a rotten foundation of using unnessecarily terse notation for the concept of "not", for allowing a shortcut "division back into" operator, and for allowing assignments to be value returning statements themselves. As you point out, Ada's operator is just fine for Ada.