🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #355

Re: struct comparison

#355
From: Mike (I'll think of something ye...
Date: Sat, 22 Jul 1989 02:14
43 lines
2515 bytes
Can I point out something that I haven't seen mentioned here yet?

It's called "maintenance."

Consider the current situation. If you've got a structure that you
need to do comparison ons, and are thinking, you'll have an include
file with the structure & a comparison macro for that structure.

When you change the structure - in any way - you have the macro in the
same place, and can change it right there as apropos for the addition.

Now, assume you're using the hypothetical "struct comparison", you
don't have a macro - just the structure definition. If you change the
structure, you may not think about changing the equality test (no
macro nearby to remind you). When you do change it, you have to verify
that the default comparison is still legal and correct. If you need to
write a macro, you'll have to find every place that comparison is
used, and fix it. If the comparison is illegal, this isn't hard, just
tedious. If it's legal, it could be a pain.

While not something that would make you want to toss the facility
completely, it's yet another argument against it. The feature seems to
die the death of a thousand cuts.

BTW, my standard answer to people who _insist_ that C ought to have a
feature is:

	Get a copy of GNU C, and add that feature. Then, when
	they do the next revision of the standard, you'll have
	"prior practice" for the committe.  This is a lot more
	likely to get it added than arguing about it on USEnet.
	Besides which, you'll be able to write non-conforming
	code that uses that feature in the meantime.


	<mike

--
I went down to the hiring fair,				Mike Meyer
For to sell my labor.					mwm@berkeley.edu
I noticed a maid in the very next row,			ucbvax!mwm
I hoped she'd be my neighbor.				mwm@ucbjade.BITNET
Technical Details
Message-ID: <26582@agate.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!eris.berkeley.edu!mwm
References: <2874@solo3.cs.vu.nl> <1989Jul14.155312.2063@utzoo.uucp> <2878@kappl.cs.vu.nl> <1989Jul15.210821.7950@utzoo.uucp> <167@ssp1.idca.tds.philips.nl> <1989Jul18.020424.2392@utzoo.uucp> <2335@trantor.harris-atd.com> <2261@auspex.auspex.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!agate!eris.berkeley.edu!mwm
From: mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer)
Newsgroups: comp.std.c
Subject: Re: struct comparison
Message-ID: <26582@agate.BERKELEY.EDU>
Date: 22 Jul 89 02:14:41 GMT
References: <2874@solo3.cs.vu.nl> <1989Jul14.155312.2063@utzoo.uucp> <2878@kappl.cs.vu.nl> <1989Jul15.210821.7950@utzoo.uucp> <167@ssp1.idca.tds.philips.nl> <1989Jul18.020424.2392@utzoo.uucp> <2335@trantor.harris-atd.com> <2261@auspex.auspex.com>
Sender: usenet@agate.BERKELEY.EDU
Reply-To: mwm@eris.berkeley.edu (Mike (I'll think of something yet) Meyer)
Organization: Missionaria Phonibalonica
Lines: 43