Why is the function SHStripMneumonic misspelled?

Raymond Chen

If you wander through MSDN, you may stumble across the function SHStripMneumonic. The correct spelling is mnemonic. Why is the function name misspelled? “It was like that when I got here.” The function was originally written for internal use only, and the person who wrote the function spelled the word incorrectly. Still, since it was an internal function, there was no real urgency to fix it. After all, there is no technical consequence of the spelling of a function’s name, as early entrants of the IOCCC discovered. If you really wanted to, you could just call all your functions F1 through F578173. There the function remained, misspelled but inconsequentially so, for some time. Since it was an internal function, it didn’t go through the normal scrutiny that a public interface receives. That’s part of what makes it internal. The effort required to fix the spelling was a bit more than usual, since the function was used by multiple teams, so there would have to be some coordination among the teams so everybody fixed their spelling at the same time. The issue sat on the back burner as a very low priority item since it wasn’t hurting anybody, and the effort required to fix it really didn’t justify the benefit (which was zero). In 2001, the order came down to document all functions which met specific criteria (the details of which I will not go into, and I would appreciate it if others didn’t try), and the SHStripMneumonic function was suddenly thrust onto the public stage before it had a chance to so much as comb its hair and make sure it didn’t have food stuck in its teeth. The function had to be documented, warts and all, and the bad spelling was one of the warts. Of course, now that the function has been published, its name is locked and can’t be changed, because that would break all the programs that used the original bad spelling.

Epilogue: Some commenters are suggesting ways that the function could have combed its hair and removed food from its teeth, completely ignoring the point that the function had to be documented, warts and all. I assure you, nobody wanted to comb that function’s hair more than me.

0 comments

Discussion is closed.

Feedback usabilla icon