|Perl Monk, Perl Meditation|
Re^5: Untillian Headache or about the semantic of untilby BrowserUk (Pope)
|on Feb 11, 2013 at 20:33 UTC||Need Help??|
Given this I dont see where the disagreement lies? Did I miss something?
Yes. You missed that I completely disagree with your assertion that [it is] far better to use while( ! ) and if(!) for complex conditions.".
The disagreement is in the imperativeness of the phrase "for complex conditions".
It implies -- and by your arguments you are more than just implying, you are stating -- that all complex conditions will be easier to understand if phrased in their while form rather than their until form. And that is patently not so.
Take your own example -- despite that it is tortuously contrived and completely illogical. This:
Is no clearer -- and is arguably much less clear -- than this:
(And no matter how you decide to apply deMorgan to it, it will never get any clearer; and will frequently resolve to a conditional that no one understands in terms of the semantics of the surrounding code.)
Neither of those are clear. And that's because it is a ridiculously contrived example that (hopefully) no one would ever code.
And that's what happens when you try to contrive an example to support an illogical argument. You end up arguing on the basis of code that no one would write.
Some conditions -- complex or simple -- lend themselves to clarity when phrased with while. Eg:
Other are clearer phrased using until. Eg:
Having both available to Perl is a strength -- highlighting a weakness in languages that do not -- and should be applauded and lauded; not denigrated away in appeasement to those who think anything not found in their first programing language is weird or dangerous.
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.