Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: in praise of type checking Date: Sat, 08 Oct 2011 16:05:56 +0200 Lines: 31 Message-ID: <9fb3m5F79oU1@mid.individual.net> References: <9f6hhqF717U1@mid.individual.net> <82lu87t4e47t1256r1vh7ich0esreter46@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net E9exO2HJ3ZYJxP0TOtQ8ugMmAs7idP1K1ikMMYYtC04cY4xuM= Cancel-Lock: sha1:v43IFayH3Y9buxVEwcW35WbrRkc= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 In-Reply-To: <82lu87t4e47t1256r1vh7ich0esreter46@4ax.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:8650 On 10/07/2011 09:36 PM, Roedy Green wrote: > On Thu, 06 Oct 2011 22:31:42 +0200, Robert Klemme > wrote, quoted or indirectly quoted > someone who said : > >> I'm surprised you mention the compiler and syntax checker. In my >> Eclipse changing the return type of a method is a refactoring which will >> easily change all affected methods in code which is part of the project. >> Lew's caveats apply of course. > > I changed the return type. That meant the caller now had to deal with > 3 possible values instead of two. There is a no way a refactor can > handle that. It is called Change Signature in IntelliJ. It is great > for swapping parms, or changing a type, or adding a new parm. When you > add a new parm, you still have to visit all the invocations to touch > up if the default value does not apply. Oh, yes! Of course you are right. Shouldn't have posted that late. Sorry for the noise. I find interesting that the debate static vs. dynamic typing comes up every once in a while. The static typers have the intuition on their side that with more expressiveness in languages and stricter enforcement of contracts less errors will happen. The dynamic typers usually refer errors being caught with tests - which you have to write anyway - even for programs in statically typed languages. And then the higher productivity of dynamic languages may actually pay off. Kind regards robert