Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jim Janney Newsgroups: comp.lang.java.programmer Subject: Re: diamond operator Date: Thu, 05 Apr 2012 14:54:12 -0600 Organization: and miles around the wonder grew Lines: 34 Message-ID: <2pfwch3nnv.fsf@shell.xmission.com> References: <2pmx6r31q4.fsf@shell.xmission.com> <9617390.2865.1333588509848.JavaMail.geo-discussion-forums@pbcgg7> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="PnllQd880uOddfy6hsxHuQ"; logging-data="20091"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19asMjmVn7PszVvOaV4G61k" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:VNw5i41mBf2LZNXoKFob+2lq7O4= sha1:B+gXscrsWvJhwQ86bLIvsQG2+QM= Xref: csiph.com comp.lang.java.programmer:13424 David Lamb writes: > On 04/04/2012 9:15 PM, Lew wrote: >> Jim Janney wrote: >>> Roedy Green writes: >>>> I was looking over the table of contents of a book about new features >>>> in Java 7 and came across a reference to the "diamond operator". >>> >>> This isn't wrong, but it fixes a problem I never knew I had. Any >>> competent IDE will expand that for you anyway. >> >> It was added to Java to satisfy the whiners who were afraid they might strain a finger >> typing "Ctrl-V" or hitting ENTER on the IDE suggestion. Heaven help > any of those >> folks should they ever have to actually work for a living. > > Overly harsh IMHO. If you ever change one of those places, you need to > change them all, and having the language feature makes it easier and > less error prone. There may be use cases where this is unequivocally a Good Thing; I've just never happened to run into one. Not sure I buy the error prone part, though: if it isn't correct it won't compile. I notice there's an Eclipse enhancement request to add a refactoring method to handle changing generic parameters: https://bugs.eclipse.org/bugs/show_bug.cgi?id=372568 Seems a bit late at this point. -- Jim Janney