First of all, let me just make this perfectly clear. This is not about language X versus language Y, nor about whether you should choose X over Y.
rahmu wroteMy question is: how important is really verbosity?
The short answer is very.
rahmu wroteSo where's the exact balance between readability and performance? Is it reasonable to abandon a technology simply based on the fact that it's harder to read?
Another issue that needs to be made clear, is that performance should never be sacrificed for the verbosity, atleast to a certain extend.
That said, let's assume that X and Y deliver the result and the profiler has shown you that the performance is pretty much the same in terms of speed yet, Developer A who implemented both scenarios in both language has effectively used 90 lines of code to implement the feature using X and 200 lines of code to implement the feature using Y.
Where was Developer A more productive?
Developers who love to "code" and are not exposed to a quantity of platforms and languages do not really bother with verbosity. We're currently in 2010 where there are a bundle of frameworks/languages that wrap a bundle of features making the tedious and boilerplate code unnecessary.
I'm pro functional paradigm, I despise writing or reading a block of code that does not necessarily require more than three or four lines to implement, being written in much more than that, JUST because the platform or language does not provide the means to do so.
In comes Java, I've linked in the Coffee Break topic, an article that describes the Closures debate. A debate that's been occuring for the past 5 to 6 years. You can refer to that, to see how such a small change can greately enhance the productivity of a developer without sacrificing performance.
Another beef i have, is whether or not a platform or language provides the developer with the flexibility of using extensions. Extensions combined with Closures, would be a total win scenario in terms of how much code you have to write.
If you want to see what java really lacks, you can refer to Scala and Functional Java.
Now concerning python, should one jump to python just because :
print "Hello World" is less verbose than System.out.println("Hello World"); ? Definitly not. Some might argue that you can wrap the java statement in a method print(string) and just call that, ending up with print("Hello World"). In comes, first order functions and closures yet again:
Let's take a very simple example and implement a way to project a list of Person objects to a list of their firstnames, presuming the definition of Person contains the property/variable FirstName.
Java:
public List<String> getFirstNames(List<Person> listOfPersons){
List firstnames = new ArrayList<String>();
for(Person p : listOfPersons){
firstnames.add(p.FirstName);
}
return firstnames;
}
Let's compare it with C# with the use of LINQ extensions:
public IEnumerable<String> getFirstNames(List<Person listOfPersons){
return listOfPersons.Select(person => person.FirstName);
}
Effectively, if you're not bothered by verbosity, you can just ignore what i'm saying and keep coding as you do right now. Though might i suggest reading a few articles about coding in functional style?