Re: Multiple returns vs. Single exit
Dmitry Beransky <[email protected]> Fri, 28 Dec 2007 13:01:11 -0800
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
I guess I wasn't facetious enough :) Mark, you are missing the point, which is that there is no one correct answer. What I'm saying (and I guess everyone else who has commented on your question) is that the coding standards exist to improve maintainability of the code. So for every clause in the standards one has to step aside and ask three questions: 1) will this improve maintainability or not? 2) is there a different way that may further improve the maintainability? 3) will this impede developers in any way and if yes, are the potential benefits worth the trouble? d. On Dec 28, 2007 12:47 PM, Mark Gorokhov <[email protected]> wrote: > Dmitry Beransky wrote: > > Does it have to be an "either-or" decision? Whichever approach makes > > the code more readable in a given situation is the one you should use. > > There is no "either-or" in our coding standards. We must use a single > return, no Hungarian notation (but "m_" is mandated), and so on. > > We are reworking old code to meet our new coding standards. =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com