bsearch of empty array

Doug Gwyn gwyn at smoke.brl.mil
Fri May 17 13:54:30 AEST 1991


In article <KERS.91May16122021 at cdollin.hpl.hp.com> kers at hplb.hpl.hp.com (Chris Dollin) writes:
>Now, which implementations have better ``quality'' - those that are happy with
>a null pointer and no elements (where the meaning is ``obvious''), or those
>that object (and hence force your code to be more portable) .... :-)

Well, it's a matter of opinion.  The best implementation for some of us
(who are trying to develop portable software) would be one that detects
the nonportable usage (null pointer argument) and makes an appropriate
squawking sound, so we can fix our programs now rather than much later
when the bug causes mysterious behavior on another system.  Others would
say that the implementation should not waste any cycles testing for
things that it is not required to handle.  Still others would agree with
you that it would be nice for the implementation to accept this usage.



More information about the Comp.std.c mailing list