Click here to Skip to main content
15,914,066 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Those books are pretty new actually... Pin
PIEBALDconsult25-Jan-17 13:08
mvePIEBALDconsult25-Jan-17 13:08 
Generalbrain cells fading... article discussing the use of early returns from functions... Pin
charlieg23-Jan-17 11:55
charlieg23-Jan-17 11:55 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
Kent Sharkey23-Jan-17 12:02
staffKent Sharkey23-Jan-17 12:02 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
charlieg23-Jan-17 12:05
charlieg23-Jan-17 12:05 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
Super Lloyd23-Jan-17 13:54
Super Lloyd23-Jan-17 13:54 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
BillWoodruff23-Jan-17 14:33
professionalBillWoodruff23-Jan-17 14:33 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
Pete O'Hanlon23-Jan-17 22:21
mvePete O'Hanlon23-Jan-17 22:21 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
BillWoodruff24-Jan-17 18:18
professionalBillWoodruff24-Jan-17 18:18 
Hi, Pete,
Pete O'Hanlon wrote:
This is not just a C# case, but has implications on the thought processes of developers in any OOP language as well as procedural languages
Of course, I agree, CP does not have, now, a popular, widely used, forum for such "generic" discussions; in fact, I think there is much more "value meat" in content where such design principles are salient in articles "grounded" in usage in specific languages, and frameworks.

I'd consider your recent articles here an "epitome" of exactly such design content grounded in real-world coding contexts.

The issue I bring up here is one I have "banged the drum" about many times: imho there is technical content, like this thread, that could very valuable for many CP users in the future ... if it were not "submerged" in the spate of the ever-overflowing Lounge collage of bonhomie, brain-farts, puzzles, rambles, etc.

Since there are forums designed for specific languages, here, which are very popular, my idea, based on sheer pragmatism, was to have a way to hoist this content out of the Lounge, put it on one of those forums, and, hopefully, enable further technical discussion.
Pete O'Hanlon wrote:
his argument completely fails to address isusues such as cyclomatic complexity.
You can bet yor boots (... err ... jodhpurs ?) I and others here would like to hear your thoughts on cyclomatic complexity and the issue of when, and how, to "return" !

Finally, I linked to Yegor's blog post because it was cited in one of the other posts mentioned, and because I thought it would add a contrarian perspective to the discussion. I do not endorse Yegor's views.

Personally, I favor using explicit multiple 'returns, rather than "fall through" to one 'return.

cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008

GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8823-Jan-17 21:51
professionalden2k8823-Jan-17 21:51 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
OriginalGriff23-Jan-17 22:03
mveOriginalGriff23-Jan-17 22:03 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8823-Jan-17 22:20
professionalden2k8823-Jan-17 22:20 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
User 1013254623-Jan-17 23:55
User 1013254623-Jan-17 23:55 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8823-Jan-17 23:57
professionalden2k8823-Jan-17 23:57 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
User 1013254624-Jan-17 0:09
User 1013254624-Jan-17 0:09 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8824-Jan-17 0:15
professionalden2k8824-Jan-17 0:15 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
User 1013254624-Jan-17 0:19
User 1013254624-Jan-17 0:19 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8824-Jan-17 0:25
professionalden2k8824-Jan-17 0:25 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
User 1013254624-Jan-17 0:42
User 1013254624-Jan-17 0:42 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8824-Jan-17 0:49
professionalden2k8824-Jan-17 0:49 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
User 1013254624-Jan-17 0:54
User 1013254624-Jan-17 0:54 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
BillWoodruff25-Jan-17 17:49
professionalBillWoodruff25-Jan-17 17:49 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
Mark_Wallace23-Jan-17 22:48
Mark_Wallace23-Jan-17 22:48 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8823-Jan-17 23:10
professionalden2k8823-Jan-17 23:10 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
#realJSOP23-Jan-17 23:22
professional#realJSOP23-Jan-17 23:22 
GeneralRe: brain cells fading... article discussing the use of early returns from functions... Pin
den2k8823-Jan-17 23:27
professionalden2k8823-Jan-17 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.