Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: StringBuilder Difficulties Date: Mon, 04 Jul 2011 21:45:46 +0200 Lines: 35 Message-ID: <97ejjfFrh1U1@mid.individual.net> References: <9744m8FpnhU3@mid.individual.net> <6cqp07tiug2nu8u6ififvvek1694fkpfi1@4ax.com> <976q3jF3etU2@mid.individual.net> <978bv1FnqaU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 7c7MsaskPG/aDQI9UypOkAgTOQSACpBAWURMjXUy65YaJG/7g= Cancel-Lock: sha1:/9CUtkKChBuxvcBYKVugaFlC8kY= User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5856 On 04.07.2011 16:52, Gene Wirchenko wrote: > On Sat, 02 Jul 2011 12:58:40 +0200, Robert Klemme > wrote: > >> On 07/02/2011 02:29 AM, Gene Wirchenko wrote: >>> Oh, I asked about that. One apparently can not pass a function >>> pointer parameter as in C. The ways that were posted involved lookup >>> every time AFIACS and I judged that it might swamp what I was >>> measuring (checking if a character were in a set). So, to my chagrin, >>> I had to go with cut-and-paste. >> >> The usual solution in Java is to factor out an API into an interface and >> have several implementations of that interface. See Callable for >> example - this basically encapsulates a "function" with no arguments and >> a single return value: > > It is horribly verbose. Java: COBOL++? In part it's the price you pay for static typing (somewhere all those type names have to appear). Tools are good enough these days to offload you from most of the hand typing via completion. If you have not yet used a modern IDE yet you should really try Eclipse or NetBeans both of which are free of charge. If you look for a language on the JVM with less overhead maybe Scala is for you. Some people do find it too compact though. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/