Path: csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Chris Riesbeck Newsgroups: comp.lang.java.programmer Subject: Re: Holy boop: goto for Java Date: Mon, 23 Jul 2012 13:27:27 -0500 Lines: 25 Message-ID: References: <6AVyr.1859$8l2.827@newsfe14.iad> <77a353f2-0933-413a-8e47-df577ba64976@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net pLIBPdQv6HgPJCbpx2r5EwjN+WGV7OLmgLAG8d+uGTPCYMAAsP8lIaEFl1iZf4PgQA Cancel-Lock: sha1:LoIrW4j7n2QLlHgCTkClU/mGSAU= User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:16252 On 7/22/2012 8:37 AM, Patricia Shanahan wrote: > On 6/4/2012 12:37 AM, Robert Klemme wrote: >> On Monday, June 4, 2012 9:28:13 AM UTC+2, Arved Sandstrom wrote: >>> What amazes me is that these individuals support this religious >>> stance by arguing that it improves readability, when producing >>> little auxiliary methods usually does anything but. >> >> I am not religious about break / continue (although I use it >> extremely seldom, I am more likely to use "return" inside a loop). >> But I disagree about your general statement about little auxiliary >> methods usually not improving readability. It all depends on the >> specific case, of course, but giving a short part of an algorithm a >> name (with the option to have a place to put JavaDoc) often helps >> readability in my experience. > > > One test that I use in this sort of situation is to try to think of a > name for the potential extracted method. If there is a good, clear, > simple name, I make a method. If not, I'm more likely to leave it in place. > > Patricia I've always liked the way someone long ago put it on this group or maybe comp.lang.lisp: "You should define a function if the call to it is clearer than the code it replaces."