in reply to Re^5: One out of three ain't bad (! !!)
in thread One out of three ain't bad

So, once again in Perl,
$conjecture->obviously_so == 1 && $conjecture->true == 0
Thanks, tye, for testing something I should've! (tho' the logic of Boolean diadics not returning Boolean values escapes me...)

Replies are listed 'Best First'.
Re^7: One out of three ain't bad (||@x)
by tye (Sage) on Oct 26, 2005 at 02:12 UTC
    (tho' the logic of Boolean diadics not returning Boolean values escapes me...)

    It allows idioms such as:

    $hostname ||= 'localhost';

    Since that is just short for:

    $hostname= $hostname || 'localhost';

    it'd set $hostname to just 'true' if Boolean operators returned Boolean values. Of course, the above is short-hand for:

    $hostname= 'localhost' if ! $hostname;

    but the first form is the only one that manages to not repeat $hostname, which can be quite an advantage in some cases, or across a bunch of similar cases. And there are other similar idioms that are useful because of this property.

    In any case, it is quite "Perlish".

    - tye