Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Holy boop: goto for Java Date: Mon, 04 Jun 2012 18:13:00 +0200 Lines: 39 Message-ID: References: <6AVyr.1859$8l2.827@newsfe14.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net rmn41/crxNENRQI9pKzD/AwzUU4WIl+T4mtNKzbwTWcf6JSglFdCietqZYz8Z8G1M= Cancel-Lock: sha1:IoN3nNy2hTsJqTwJmHhhA7Okir0= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:15049 On 04.06.2012 16:44, Mike Schilling wrote: > Lew wrote: >> I have never seen a use of Java's labeled 'break' or 'continue' >> outside of tutorials and examples, though. >> > I've very occasionally found them useful, but they are on the list of things > I wouldn't miss if they were gone. Others: > > * Do-while. It seems almost never to be what's needed. Though I do quite > often need > > while(true) > { > stuff > if (condition) > { > break; > } > more stuff > } Interesting: I cannot remember having needed this. While I do remember using do {} while. What use cases do you have for the construct above? > * Local classes (i.e. named classes defined inside a method) +1 > * The non-short-circuit logical operators& and | +1 Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/