Re: Multiple returns vs. Single exit
Frank Harper <[email protected]> Fri, 28 Dec 2007 22:54:31 +0100
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <[email protected]> |
I actually like and use the convention of adding the "m_" prefix for members, I think it makes reading unfamiliar code much easier. Frank Harper On Dec 28, 2007 10:49 PM, Attila Szegedi <[email protected]> wrote: > On 2007.12.28., at 21:47, Mark Gorokhov 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. > > Heh - that's already partly Hungarian notation then. Charles probably > doesn't read this list, so I don't think I'm running the risk of scorn > next time I bump into him, but Hungarian notation is totally > meaningless for a reasonably strongly typed language such as Java. It > was sort-of okay for C where you could accidentally cast, say, a > lpszFoo to iBar (but even there, a decent compiler would've warned you). > > > > > > > We are reworking old code to meet our new coding standards. > > Ask your manager to provide you with a cost/benefit analysis they > performed before deciding on this grandious waste of time. If it > doesn't exist, or doesn't convince you (I doubt it will), you can > choose between: > - trying to bring them to common sense > - silent desperation > - looking around for a new job. > > I'm honestly sad to read such stories in 2007 (nearly 2008). > > Attila. > > > > > > > Mark G. > > > > =================================== > This list is hosted by DevelopMentor(R) http://www.develop.com > > View archives and manage your subscription(s) at > http://discuss.develop.com > =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com