Re:First Impressions of Python from a Java Developer
by xiongchiamiov on Monday November 08, 2010 @06:56PM
(#1884595)
There are some things that Java just is more verbose at. For instance, my pet peeve - accessor methods. Most other modern languages have properties, which allow you to only write special cases when you need them.
Re:First Impressions of Python from a Java Developer
by nickbarnwell on Tuesday November 09, 2010 @02:08AM
(#1885669)
This is one of the things that Play does well; setters and getters are generated for you at runtime so you only have to write it as:
public Date submittedAt;
and set/get it as you would any other variable. Easily one of my favorite things about the framework, and saves my { and } keys work as well.
Java doesn't need to be ridiculously verbose, others have mentioned much of that verbosity stems from basic functions not being included in the standard library. Python's opening of a file isn't any more elegant than Java's if you look at the code behind open(), it's just abstracted away.