Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer Subject: Re: java.lang vs java.util Date: Wed, 06 Apr 2011 15:34:48 -0400 Organization: albasani.net Lines: 43 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net GyZQW1b7OA3N8I7xyf3ej0LFbLk1/5s+tKeQ2SXx+5yQwIJ72JmPETuDLDGjpvasRwWtFMXOMsYWz4YBwkFrxA== NNTP-Posting-Date: Wed, 6 Apr 2011 19:34:48 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="EhqdUqqWCsSa+wInqW5T6yFdjxRpCSDANM8MZUasCI8BQHnokJpOlMZtlxjPnPloZ1Pm03358YHWJRa20xBKL8isFFMgstEAznMFNk5933SfrnGhqag6LjVDdb7att/g"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: Cancel-Lock: sha1:JcRvaESSANHLetk3FINrQNr0Kio= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:2902 Patricia Shanahan wrote: > You will never get fluent in Java if you think Python code is a > reasonable specification for your Java code. > > This is a problem I've seen many times in people moving from language to > language. Every language has its own idioms, its own ways of expressing > things. Translation from code in language X to code in language Y leads > to very stilted, awkward code in Y. In effect, the code is written in a > dialect of Y that contains only those features of Y that correspond > closely to features of X. Such a dialect can be very frustrating. > > It is not unique to Python and Java. I've seen it, for example, in It's not even unique to computer languages. > people moving from assembly language to C. I expect it would happen to > someone who had got too locked in on Java who tried to write Python code > from Java code, rather than by finding out what the code is intended > to achieve. > > I've sometimes had to try to reconstruct a specification from code, but > it is a messy process, liable to include things that are not required > and miss other requirements. Why do that, when there is someone who > presumably knows exactly what it is meant to do? > > Having a design document other than the code itself does not mean > "filled out in tedious detail and no doubt signed off in triplicate". It > means having one at about the level of detail you would have had in your > own mind before writing the Python code. > > I do not think that you will be happy with Java if your main criterion > for good code is short code. Java's main advantages to my mind are > readability, portability, and a tendency to catch typos at compile time. > It is not a compact language. There is a perhaps apocryphal tale of an early natural-language translation program taking "out of sight, out of mind" from English to Russian, then back to English as "invisible and crazy". -- Lew Honi soit qui mal y pense. http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg