There are many constructs like min, max, AND and OR that you can implement either by using if statements or by calling library methods. Which should you choose? I almost always choose to call the library methods because they communicate more information to the developer. An if by itself tells you how an operation is performed but not why. Methods like min, max, AND and OR get closer to telling you why an operation is being performed. The word max quickly conveys its intent better than an if on an inequality. I usually prefer to go further still and create a separate method that performs the operation and gives it a readable name, but I still use the library calls to help me. The point is that you need to convey the operation clearly to the developer, and using lower-level constructs doesn't help with that communication.
Download