struct comparison - reprise

Doug Gwyn gwyn at smoke.BRL.MIL
Sun Jul 23 21:20:39 AEST 1989


In article <2272 at auspex.auspex.com>, guy at auspex.auspex.com (Guy Harris) writes:
> Sorry, but if you want complex numbers as a data type in C that uses C
> operators, you can't get that just by pasting on new general "struct"
> operators; you either have to add it to the language, or go the C++
> route.

That's also my general observation:  When I need composite objects, I
practically always find that I also need operations on them beyond any
simple model that could reasonably be supported directly via language
operators.  Complex multiplication is just one of the simplest examples.
Since I have to provide a set of explicitly programmed operations anyway,
it is not a lot of additional bother that the language doesn't directly
support a few of them.



More information about the Comp.std.c mailing list