by Michael S. Kaplan, published on 2007/07/08 03:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2007/07/08/3747992.aspx
Just the other day, developer George was asking me about that Reversing sort keys post I wrote way back when.
His main interest was not in the functionality, but in the name of the function! :-)
He couldn't decide whether the name of the function would be UnLCMapString or LCUnMapString....
An interesting problem is positional morphology, no?
Well, actually, no!
The LCMapString function has a simple job -- it does locale sensitive mapping of string. And in almost all cases, those mappings have reverse mappings, which means that operations involving A(B(A(<string>))) == A(<string>).
You can see this with
And the only mapping that has no reversing operation is LCMAP_SORTKEY.
Thus, if the functionality to reverse sort keys ever did exist, it would almost certainly be another flag for LCMapString to use, not a whole new function (which neatly sidesteps the positional morphology question by rejecting the premise that either name makes sense!). :-)
But let's pretend that is not the case, and that one did have to choose between two different function names for reversing operations. And you were looking at either UnLCMapString or LCUnMapString.
What would the best name have been?
Now keep in mind this is not the opinion of a trained linguist, but I'll give it a shot....
Given that the name LCMapString really exists for the purpose of locale-sensitive mapping of a string, if one were positing a function name for the reverse operation (locale-sensitive unmapping of a string), it seems like the best name choice would in fact be LCUnMapString.
Of course this implies that the process for creating the names of Win32 API functions is either consistent or intuitive, a shaky assumption at best. But for a function that probably shouldn't ever exist even if the functionality did (which it doesn't), there is no harm in being idealistic about the process, right? :-)
This post brought to you by ᴙ (U+1d19, a.k.a.LATIN LETTER SMALL CAPITAL REVERSED R)
go to newer or older post, or back to index or month or day