Re: single return from function

Alfredo Chávez <[email protected]> Mon, 10 Dec 2012 20:58:27 -0600
Newsgroups gmane.comp.programming.refactoring
Message-ID <[email protected]>
It's not true. Actually, the use of guard clauses goes explicitly against s=
uch thing. Single point of result is a valuable rule of thumb, but it becom=
es less so as your methods become shorter.


Enviado desde Samsung Mobile

alex_us01 <[email protected]> escribi=C3=B3:

On the internet, I found somewhere* that the Refactoring book advocates for=
 a single return from a function (thus, promoting assigning values to a var=
iable, such as result, and then say return result; at the end).

Is that true?

I couldn't find it anywhere in the online catalog.

Thanks!

* see item 8 (might change)
http://www.javalobby.org/forums/thread.jspa?forumID=3D61&threadID=3D16937




[Non-text portions of this message have been removed]



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/refactoring/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/refactoring/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected]=20
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/