Reminds me of something I slapped together a few years ago when I was bored, a programming language based around leet-speak:
http://www.geocities.com/electrodruiduk/l33t.htm
(Yes, the Real WTF is that the site currently lives on Geocities...)
Reminds me of something I slapped together a few years ago when I was bored, a programming language based around leet-speak:
http://www.geocities.com/electrodruiduk/l33t.htm
(Yes, the Real WTF is that the site currently lives on Geocities...)
From the page:
"Boolean to Enum converts a Boolean type to an enumeration, updating client code if necessary. This is for those occasions where you have an existing method returning a Boolean, but suddenly realize that there is another result you want to return (for fans of The Daily WTF, this means you can now convert a Boolean result into an enumeration with True, False, and FileNotFound)."
So, they KNOW that True/False/FileNotFound is a dumb thing, because it crops up here so often. But they add that feature anyway? Okay, so I can see some uses for the feature (turning a function like IsThisAppleRed() (returning true/false) to the more informative GetAppleColour() (returning RED/GREEN)), but they're advertising it as a tool for deliberate WTFery. How bizarre...
Twenty spaces North, and twenty-four spaces West. W, T and F mark the spot. Yarr!
</stupid pirate joke>
I'm assuming this is C... Um, it's difficult to tell what all the WTFs are given the information we know. There's the obvious one that it's returning a pointer to a local variable, which is never a good thing. As for the rest of it, well it looks like the function is kinda trying to be a Singleton implementation of sorts, but there's no way of telling exactly what it does unless we know what MY_EXPORT, SET and GET are (presumably macros of some sort), and what ErrorFunc is supposed to do.
Heh, and it leaks temp when it returns without an error - no guarantee that temp is still usable (very probably not) but it'll just sit there eating up memory anyway. That's quite cute.