Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Ternary vs. Sort vs. Max

by BrowserUk (Patriarch)
on Aug 10, 2015 at 10:38 UTC ( [id://1138006]=note: print w/replies, xml ) Need Help??


in reply to Ternary vs. Sort vs. Max

That sort construction is (IMO) far more obscure and obfuscate than the ternary.

As for List::Util::max(); if I need to find the max() of a bunch (more than two) things, I use it, but -- just as my wife doesn't break out her food processor to slice a tomato for a sandwich -- for two items, the ternary construct is simple, efficient (and to me; clear). Perfect for the task at hand.


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". I knew I was on the right track :)
In the absence of evidence, opinion is indistinguishable from prejudice.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-29 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found