http://www.perlmonks.org?node_id=975747


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?