• (cs) in reply to dhromed

    dhromed:

    Interesting. Someone's invented complex booleans with a 'maybe' value? I wonder what the keyword and Number equivalent would be.

    var foo = maybe and var foo = new ComplexBoolean(0.5) ?

    Boolean foo = null would be more likely... like nullable types or database fields...

  • (cs) in reply to wtijsma

    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...

  • Ken (unregistered) in reply to wtijsma
    wtijsma:

    dhromed:

    Interesting. Someone's invented complex booleans with a 'maybe' value? I wonder what the keyword and Number equivalent would be.

    var foo = maybe and var foo = new ComplexBoolean(0.5) ?

    Boolean foo = null would be more likely... like nullable types or database fields...



    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
  • Loz (unregistered) in reply to Ken
    Anonymous:
    if (connected || !connected)
    {
    //ED: Snip
    }

    This could potentially be understandable if 'connected' is of a triboolean type.
    (e'g Boost's boost::tribool type which has an indeterminate value)


    Maybe it is volatile and flips every time you read it.
  • joe (unregistered) in reply to Maurits

    sendmail(%email) || &fail;
    if($failed == 1)

    Isn't the WTF in the pearl example that it assigns to &fail but checks $failed

  • (cs) in reply to joe

    Nope - because you don't understand Perl. &fail is a function call (most Perlers would write "fail()" instead). And the function assigns to $failed.

  • (cs)

    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 :)

Leave a comment on “A Great Gallimaufry of Goofiness ”

Log In or post as a guest

Replying to comment #:

« Return to Article