[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
Re: [FWP] Goal oriented programming
> See ch. 8 of The Camel under Programming with Style.
>
> The Perl style guide says you should put the important thing on the
> left, which is another way of saying you should try to make your goal
> clearer to the reader.
> - Larry Wall
>
>
> So (quoting from The Camel, p. 547)
>
> print "Starting analysis\n" if $verbose;
>
> is better than
>
> $verbose && print "Starting analysis\n";
>
> since the main point isn't whether the user typed -v or not.
I agree with premise (important stuff first) but not the conclusion
(action is more important than the condition).
Regardless of what camel suggests the condition is more important:
if (0) { whocares(); }
==== Want to unsubscribe from Fun With Perl?
==== Well, if you insist... Send mail with body "unsubscribe" to
==== fwp-request@technofile.org