On 09/02/2012 22:34, bearophile wrote:
Comparing languages with small code snippets doesn't tell you all you want to 
know about how a language scales for very large programs, of course, so they 
aren't enough. But such small snippets are very useful any way because large 
programs are mostly made of small parts; and it's still true that being able to 
remove one line from a group of 4 lines sometimes means reducing the size of a 
large program by 10% or more. So little syntax niceties matter even for huge 
programs. This is also why (as example) Python list comps are very useful for 
programs one million lines of code long too.

Yeah, I'm not saying comparing small snippets is not useful... Clear it is, I mean, it's not practical to write a full application just to compare languages, obviously. Rather it's the mindset when examining such snippets that is important: one should be thinking of the impact the language has not just on code like the snippet, but on a medium-large sized code as well (and code written by multiple people). And I've seen several sites and discussions where such a mindset is completely ignored... (like people dissing the fact that in Java you can't write a function outside a class, you have to use a static method, and thus have a class wrapping it around...)


--
Bruno Medeiros - Software Engineer

Reply via email to