- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Boolean foo = null would be more likely... like nullable types or database fields...
Admin
Anyway, call me a WTF'er, but what's are arguments against simple BL in XSLT?
Just implemented it in an (C#) application, any arguments against it (or alternatives), and I'll throw it away...
Admin
For the record, the Boost library's triboolean type has an indeterminate value called --wait for it -- "indeterminate". But you can rename it to anything you like using a macro. More info here: http://www.boost.org/doc/html/tribool.html
Admin
Maybe it is volatile and flips every time you read it.
Admin
sendmail(%email) || &fail;
if($failed == 1)
Isn't the WTF in the pearl example that it assigns to &fail but checks $failed
Admin
Nope - because you don't understand Perl. &fail is a function call (most Perlers would write "fail()" instead). And the function assigns to $failed.
Admin
If ever will there be a WTF top10, I think this one should be in the first 3 places:
if (connected || !connected)
{
//ED: Snip
}
It is just brilliant! I had lots of laughs with this one :)