On Thu, 12 Jul 2001, Rogério Brito wrote:
On Jul 12 2001, Kurt Edmiston wrote:
> I guess I'm just curious to know what other more experienced Perl
> programmers think about this. I still adhere strictly to the "one way
> in, one way out" philosophy, mainly for the sake of readability. But
> I understand how much easier it can make a programmer's task to write
> something like "if (some condition) { exit; }"
I usually use the 'one way in, multi ways out' when I write Perl, but 'one
way in, one way out' more often with C.
I find that there is a time for multiple exit points, and a time for
single exit points. I never limit myself to one way or the
other; sometimes it causes too much nesting trying to stick to one exit
point, and othertimes it causes too little readability with more than one.
Use your judgement based on the problem... don't stick to one philosophy
or the other "just because".
- D
<[EMAIL PROTECTED]>