Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: in praise of type checking Date: Fri, 07 Oct 2011 20:18:39 -0400 Organization: A noiseless patient Spider Lines: 28 Message-ID: References: <24031358.1064.1317908585192.JavaMail.geo-discussion-forums@prfp13> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 8 Oct 2011 00:19:52 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="f8igmItKsWs6nM5YanFxAA"; logging-data="22568"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/8qpBeHF0tCni6WYtm5FgH" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:Ma+NhIK/9q4kuhLPXpRmS/Qn1ww= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8647 On 10/7/2011 3:43 PM, Roedy Green wrote: > On Thu, 6 Oct 2011 06:43:04 -0700 (PDT), Lew > wrote, quoted or indirectly quoted someone who said : > >> >> It must not have been that widely used, then, if all the uses were in the o= >> ne project. > > It was widely used within the project. It is internal code I use for > generating references to bookstores/books/electronics at various > online stores. > > Even if it were widely distributed, and even if it were a public > method, type checking at least warns my clients I have changed the > signature of a public method without warning them. They may want to > shoot me, but at least they know precisely WHY they want to shoot me. Even in my private code that I never intend to distribute to anyone at all, I make a point of changing something's name if I change its nature. That's seldom onerous, because a change in nature usually means the old name is no longer appropriate: /* old */ boolean isImportant() ... /* new */ float[] isImportant() ... // say, what? -- Eric Sosman esosman@ieee-dot-org.invalid