opensubscriber
   Find in this group all groups
 
Unknown more information…

a : advanced-java@discuss.develop.com 16 January 2008 • 12:33PM -0500

Re: [ADVANCED-JAVA] Multiple returns vs. Single exit
by Ted Neward

REPLY TO AUTHOR
 
REPLY TO GROUP




Dogma is the root of all evil.

Ted Neward
Java, .NET, XML Services
Consulting, Teaching, Speaking, Writing
http://www.tedneward.com


> -----Original Message-----
> From: Discussion of advanced Java topics. [mailto:ADVANCED-
> JAVA@DISC...] On Behalf Of Mark Gorokhov
> Sent: Friday, December 28, 2007 11:52 AM
> To: ADVANCED-JAVA@DISC...
> Subject: [ADVANCED-JAVA] Multiple returns vs. Single exit
>
> Our company has a coding standard which prohibits multiple returns from
> a method. I think that mandating to use a single exit from a method
> makes code less readable but I have to follow this standard.
>
> It seems to me that there is no agreement on this. Search returns many
> entries.
>
> Vote for multiple returns:
> http://ivan.truemesh.com/archives/000611.html
> http://peripateticaxiom.blogspot.com/2006/03/functional-style-and-
> multip
> le-returns.html
> http://mail.python.org/pipermail/tutor/2004-December/034134.html
> http://www.javapractices.com/topic/TopicAction.do?Id=114
>
> Vote for a single exit:
> http://jroller.com/fra3k/entry/code_improvement_guidelines
> http://www.extragroup.de/weblog/hmk/archives/002997.html
> http://www.extragroup.de/weblog/hmk/archives/002999.html
> http://whatimean.wordpress.com/2007/02/08/multiple-return-points-are-
> bad
>
>
> History & discussions:
> http://osdir.com/ml/programming.language-of-the-year/2005-
> 01/msg00043.ht
> ml
> http://www.codecomments.com/archive205-2004-12-340086.html
> http://www.leepoint.net/JavaBasics/methods/method-commentary/methcom-
> 30-
> multiple-return.html
> http://onthethought.blogspot.com/2004/12/multiple-return-
> statements.html
>
>
> This question is definitely not an advanced one but I'm interested in
> your opinion.
>
> Thanks
> Mark G.
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.17.11/1201 - Release Date:
> 12/28/2007 11:51 AM
>

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.19.2/1224 - Release Date: 1/14/2008
5:39 PM

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.