in reply to
Re^4: if statement confusion
in thread if statement confusion
My point was not to suggest that life is fair, or that one should always take contracts at face value. It was to point out that the preceding person's point (while poorly presented) was about the fact that the guy writing the code should try to make the code clear. Your analogy to contractual law is looking at the wrong side of the transaction, talking about the behavior of the reader rather than that of the writer.
Obviously, code should be correct, first and foremost -- but within that constraint, it should also be as clear as reasonably possible. There's no necessity to limit oneself to a simplistic subset of a language to achieve that (and I agree with the entire paragraph in which you mentioned opposition to that notion), in the general case, and I even agree that in this case it makes sense to use a clarified and correct ternary operator, but I disagree with your approach of disputing the statement that one should strive to write clear code.
I also think you're now manufacturing disagreement with me where it does not actually exist, when denigrating my character (apparently on the basis of the fact that you're feeling defensive).
In the end, the lawyer analogy is a poor one for this situation, no matter what point you're trying to make. The motives, incentives, and circumstances surrounding contracts and software applications are simply too different, and I should have avoided using your analogy to try to make my point. I also should have said that I thought you were creating disagreement where none essentially existed, rather than a problem. Here we see that clarity in English is important, just as it is in Perl.
|print substr("Just another Perl hacker", 0, -2);||- apotheon
Licensed OWL by Chad Perrin