Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: A practical use of Logic::Kleene (3-valued logic)

by BrowserUk (Pope)
on Sep 14, 2011 at 14:44 UTC ( #925922=note: print w/ replies, xml ) Need Help??


in reply to A practical use of Logic::Kleene (3-valued logic)

"Three value logic" is of little use when you only have binary control mechanisms.

To be of value, you'd have to have a control structures that had three branches:

if( <condition> ) { ... } else { ... } otherwise { } my $var = <COND> ? $a :: $b :: $c;

Given that about 90% of programmers seem unable to handle the idea of:

unless( <cond> ) { ... } else { ... }

It seems unlikely that they'd go for trinary control mechanisms any time soon.

Without them, you'd just end up coding the direct equivalent of:

if( $loginAttempted ) { if( $loginSuccessful ) { ... } else { ... } } else { ... }

But in a far more obscure way.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: A practical use of Logic::Kleene (3-valued logic)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://925922]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2014-07-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (169 votes), past polls