Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: StringBuilder Difficulties Date: Tue, 05 Jul 2011 09:32:16 -0700 Organization: A noiseless patient Spider Lines: 31 Message-ID: References: <9744m8FpnhU3@mid.individual.net> <6cqp07tiug2nu8u6ififvvek1694fkpfi1@4ax.com> <976q3jF3etU2@mid.individual.net> <978bv1FnqaU1@mid.individual.net> <97ejjfFrh1U1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 5 Jul 2011 16:32:21 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="5HSAJfqnDjjLFxXZ6WBWEw"; logging-data="27746"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jh2mQcdv4MtnVtrqL0WOMn7Rv9c/pFP0=" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 In-Reply-To: Cancel-Lock: sha1:kPE8ZPbdRKhHhlk9U5VbnY0XVCE= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5859 On 7/4/2011 11:06 PM, super... wrote: > > public foobar (int a, String b) { > x = a + b.length(); > y = 1.3*x; You go through quite a bit of verbiage to justify not typing int and double in front of those last two lines. (Incidentally, while we're talking excess verbiage, your nom de usenet broke my reply button. Do you think you could adopt something that's less than 40 characters?) > Define "too compact", given that it doesn't go to line-noisy extremes > like perl. Here at least we agree--Perl is too "compact" to the extreme that it's almost unreadable. Sure, I wouldn't mind if the Java compiler were a bit smarter, but at the same time I don't feel your examples were exactly compelling either. It's just not that hard to specify the type of a variable explicitly. No one's fingers will fall off from typing. I understand you don't care for it, but it's not odious either. Those of you who really like this sort of thing should check out lambda expressions for Java 8, there's some additional type inference coming where it's really needed.