Path: utzoo!mnetor!uunet!husc6!ukma!rutgers!mtune!whuts!homxb!ihnp4!ihlpg!tainter From: tainter@ihlpg.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: A bad design decision early on in ANSI C. Message-ID: <4604@ihlpg.ATT.COM> Date: 11 Jan 88 23:09:00 GMT References: <1322@sugar.UUCP> <1942@ho95e.ATT.COM> <1373@sugar.UUCP> Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 33 In article <1373@sugar.UUCP>, peter@sugar.UUCP (Peter da Silva) writes: > IF you're going to have structure assignment > and passing, you should also define "(time_t) < (time_t)". It's tricky, isn't > it? > -- Peter da Silva `-_-' ...!hoptoad!academ!uhnix1!sugar!peter I have seen this repeatedly, and it is starting to bother me. I think if you are going to have structure assingment you should have structure comparison for equality (and non equality). This IN NO WAY requires the definition of order (i.e. <, > comparisons). Anyone with mathematic training beyond basic algebra should have no problem with this. Why should all structures form fully ordered sets? Analogy: cartesian coordinates for points in 2-D real space Here each coordinate has a "natural" order inherited from its fully ordered domain, but the set of all coordinates has no such "natural" order. Note: Pascal defines structure assignment and equality comparison without defining full order. Note: It is trivial to define full order by the way. One just states that the order of declaration of fields defines significance. Since all underlying types are fully ordered composed types can have such an arbitrary order imposed on them. A final point, the argument that structure comparison can't be done because of wholes is specious. The compiler need only expand it to a field by field comparison. SO WHAT if it doesn't gain in performance, that isn't the point, the goal is to get a fully defined structure support. --j.a.tainter --j.a.tainter --j.a.tainter