Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: Please help...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 8 Topic 11052 of 11518
Post > Topic >>

Re: Please help critcize and shorten my sub code

by Jenda@[EMAIL PROTECTED] (Jenda Krynicky) May 11, 2008 at 03:44 PM

From: Peter Scott <Peter@[EMAIL PROTECTED]
>
> On Sun, 11 May 2008 02:05:06 +0200, Jenda Krynicky wrote:
> > You do not need the label unless you need to jump out of some other 
> > loop than the innermost. In this case there are no nested loops so it 
> > would probably be better to skip the label.
> 
> While I personally program the way you suggest, take note that "Perl
Best
> Practices" says that loops that are explicitly exited should be labelled
> in all cases (http://www.oreilly.com/catalog/9780596001735/toc.html),
so
> we should not criticize people for following the practice.

Looks like yet another case in which I disagree with PBP. IMHO, only 
the loops that need to be labeled should be labeled. To me a label is 
a warning sign, something that says "hey, be careful here, this is a 
place to which we might jump, a loop out of which we might jump while 
inside another loop or something like that." I can't think of a good 
similitude, maybe I could compare it to overabundance of trafic 
signs. If you put up too many, the drivers will become distracted and 
are more likely to ignore or miss the one that was really im****tant.

In either case "would probably be better to" doesn't look like 
criticizing to me :-)

Jenda
===== Jenda@[EMAIL PROTECTED]
 === http://Jenda.Krynicky.cz
=====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
	-- Terry Pratchett in Sourcery
 




 8 Posts in Topic:
Please help critcize and shorten my sub code
rich.japh@[EMAIL PROTECTE  2008-05-10 19:21:05 
Re: Please help critcize and shorten my sub code
Jenda@[EMAIL PROTECTED]   2008-05-11 02:05:06 
Re: Please help critcize and shorten my sub code
rich.japh@[EMAIL PROTECTE  2008-05-10 20:20:13 
Re: Please help critcize and shorten my sub code
Jenda@[EMAIL PROTECTED]   2008-05-11 03:02:04 
Re: Please help critcize and shorten my sub code
rich.japh@[EMAIL PROTECTE  2008-05-10 23:03:58 
Re: Please help critcize and shorten my sub code
Peter@[EMAIL PROTECTED]   2008-05-11 05:56:15 
Re: Please help critcize and shorten my sub code
Jenda@[EMAIL PROTECTED]   2008-05-11 15:44:09 
Re: Please help critcize and shorten my sub code
rob.dixon@[EMAIL PROTECTE  2008-05-11 20:57:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 13:08:56 CDT 2008.