Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site brl-vgr.ARPA Path: utzoo!watmath!clyde!floyd!harpo!seismo!brl-vgr!gwyn From: gwyn@brl-vgr.ARPA (Doug Gwyn ) Newsgroups: net.lang.c Subject: Re: structure and array and string comparisons Message-ID: <2831@brl-vgr.ARPA> Date: Sat, 24-Mar-84 17:36:41 EST Article-I.D.: brl-vgr.2831 Posted: Sat Mar 24 17:36:41 1984 Date-Received: Sun, 25-Mar-84 19:26:30 EST References: <253@opus.UUCP>, <365@denelcor.UUCP> Organization: Ballistics Research Lab Lines: 15 I think the real problem with struct comparison is that there is no "natural" order relation among structs of the same kind, except for exact equality. This is in contrast to real numbers where there is a natural order defined. (For an illustration, consider a "complex number" struct. Ask the nearest mathematician how to determine which of two complex numbers is the "smallest". If he gives you any algorithm at all, it will probably involve the moduli of the complex numbers. How is the compiler going to know all this?) I have the same objection to overloading of operators (as in Ada). Just because one can use the same symbol (e.g. "+") to combine two objects in each of several different classes by no means implies that it is the "same" operation in the different classes, or even a unique extension. (Example: a Boolean "+" could be a "union"; it could also be a "Boolean sum". Which is "correct"?)