Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: if statement confusion

by BrowserUk (Pope)
on Jun 12, 2012 at 10:48 UTC ( #975747=note: print w/ replies, xml ) Need Help??


in reply to Re^3: if statement confusion
in thread if statement confusion

Yes, I'd always want an expert to be the one handling my contracts, medical diagnosis, etc. But does that mean that they should be made as complex as possible so that ONLY an expert can understand it?

No. But then, I never suggested that. Requiring more than "a glance" is not the same as "complex as possible".

And suggesting that every program should be written so as to be understandable by the most inexpert of programmers is a crock.

Eg. There are some algorithms that are very cleanly and concisely described using recursion, that require verbose, intricate and vastly more complex descriptions when done without it.

But there are quite a few "programmers" -- including some I've encountered in quite senior positions with 'many years of experience' -- who simply cannot 'get' recursion. Avoiding recusion because there are some people that will never get it is ridiculous.

Finally, there is nothing "complex" or "difficult" about the ternary statement:

my $var = cond ? constantA : constantB;
, which is where this subthread got started.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
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.

The start of some sanity?


Comment on Re^4: if statement confusion
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2014-09-21 18:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (174 votes), past polls