by Michael S. Kaplan, published on 2007/10/15 10:46 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/10/15/5462057.aspx
The title quote comes from a Friends episode with Lisa Kudrow ending the mini conversation by giving us one of those pondering questions out of nowhere....
Think of this post as a follow-up of sorts to Is RtlCompareUnicodeString used correctly?
That post pointed out that every call I could see to RtlCompareUnicodeString was functionally equivalent to a slightly faster call to RtlEqualUnicodeString.
As a follow-up, let's look at How do I feel about lstrcmpi? I think it blows.... and consider the fact that of the tens of thousands of uses of lstrcmpi in the source tree, almost every one of them is incorrect.
And this particular incorrectness may be faster (for now), but in some cases the difference may not matter due to a closed set of strings being tested, but it is still the wrong function, and many of those instances are real bugs that will need to be fixed by someone such as myself.
But then I stop and ask myself something.
If a function is used a lot and is almost always used incorrectly, should I instead consider changing the way the function works instead?
I mean, is it just being stubborn to claim it is a backcompat issue to actually change behavior to meet the obvious expectation of callers, at the minor cost of complicating the documentation a bit and fixing up a few callers who may have been getting it right?
Or is it better to preserve the consistent (but wrong) user locale specific, linguistically correct behavior?
Boy, that's a tough call!
The characters of Unicode are all too shocked to sponsor this post