My 2 cents worth.

I think you guys are mixing two subject: usefulnees of the function & proper logic.

Logically if you search for nothing you will find what you are searching for. Furthermore since you found something it must be somewhere. Logically it was in the first place you looked. Logically I think the function is consistent. Consider the point if you search for a null string in a null string. They are equivalent in every sense and if you follow some of the logic given above you wouldn't find one in the other. Isn't this illogical.

(I am not sure but might this not be a variant of the Bertand Russell paradox concerning set theory. The implication of the theorem is some logic systems are not closed.)

But consistency is not everything, since multiple consistent logic system can be constructed. I think the thrust of Richard's comments is that in this case usefulness might be a better criteria than logic. I tend to agree with Richard.

[ 10 June 2002, 22:27: Message edited by: JackLothian ]
_________________________
Jack