When it is amoral...

Doug Gwyn gwyn at smoke.BRL.MIL
Mon May 8 07:15:04 AEST 1989


In article <4093 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>In article <563 at lzaz.ATT.COM>, hutch at lzaz.ATT.COM (R.HUTCHISON) writes:
>> 	midpoint_pointer = (start_pointer + end_pointer) / 2;
>You're right. It's a valid operation.
>(what's the average of the 7 clubs and the 9 clubs?)

What's the average of the 7 of clubs and the 10 of clubs?
What if sizeof(club) > 1?  Shouldn't we end up pointing into
the middle of a club?

How is any sane language definition supposed to factor in
such application-specific notions of what is "appropriate"
behavior?

C provides a sufficiently simple way to specify exactly what
is intended in such situations.



More information about the Comp.lang.c mailing list