On Wed, 13 Apr 2011 21:57:53 -0700, Mariano Loza Coll wrote: > Hi all, > >> OC> I never bothered to learn how >> OC> to use goto because it's deprecated (or on it's way?), but it OC> >> seems like this would be a good place to use it. At the same OC> >> time, I understand that use of goto is akin to sleeping with your OC> >> sister among most programmers in the Perl programming community. > > Like Owen, I've come across many a recommendation AGAINST using goto in > Perl. And (like Owen?), I have yet to find one that explains clearly the > reasons arguing against its use. If nothing else, it has made me very > curious... Can any of the more experienced programmers (ie. nearly > everyone else on this list by my standards) point to a good explanation > as to why one should avoid goto in Perl (or coding in general)? I looked > around in perl-begin.org but couldn't find anything obvious. Once again, > I make my request from the purest desire of learning Perl the best way I > can.
Here is the definitive explanation: http://www.cs.utexas.edu/users/EWD/ ewd02xx/EWD215.PDF . I have never, ever, seen a situation where the use of goto would have resulted in clearer code. Considering it has always indicated to me that the person considering it has not understood the problem properly or modeled its solution well. Goto simply is not part of the vocabulary of clear coding. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/courses/perl3/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/