Re: Multiple returns vs. Single exit
Rob Griffin <[email protected]> Sun, 30 Dec 2007 14:05:15 -0800
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <21CDF59FC7A26F4FAB7A0B867833DC7940724917@alvxmbw01.prod.quest.corp> |
Oh, and as far as return goes, in Eclipse you can give the return keyword a different colour and attribute to all other keywords to make it stand out. I have return underlined and in a deeper colour that the other keywords. You can glance at any method and immediately see where it returns. -----Original Message----- From: Discussion of advanced Java topics. [mailto:[email protected]] On Behalf Of Rob Griffin Sent: Monday, 31 December 2007 8:59 AM To: [email protected] Subject: Re: [ADVANCED-JAVA] Multiple returns vs. Single exit I use the syntax colouring feature of Eclipse to differentiate class member variables, method parameters and static fields and methods. I also have members underlined and method parameters italisized. My screen is very colourful but I find it extremely helpful. When I look at code on another programmer's computer I feel that I'm really missing vital information. Rob Griffin. -----Original Message----- From: Discussion of advanced Java topics. [mailto:[email protected]] On Behalf Of Frank Harper Sent: Saturday, 29 December 2007 8:55 AM To: [email protected] Subject: Re: [ADVANCED-JAVA] Multiple returns vs. Single exit 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(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 =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com