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.
|
---|