The real test should be, "How short can you make this code using libraries available for the language which would be generally useful working on some other task as well."
The real test should be, "How short can you make this code using libraries available for the language which would be generally useful working on some other task as well."
There are really three, separate things under consideration here:
- What is the expressive power of the language's syntax?
- How strong is its standard library?
- How strong is library coverage for common tasks?
The first question is what the second example tries to demonstrate, i.e. "How concise could this be made in Ruby?" The second question, I agree with you mostly. There are outliers like C++ with an especially poor standard library, but in general, that doesn't speak to the language's innate power. And in the third, I hit at in the post by saying that I feel this particular task is a bit contrived with respect to Arc: it shows simplicity in things that I wouldn't necessarily look for in a web programming language, but lacks things that I would expect (i.e. the ability to connect easily to web services APIs).
What is the total LOC of the implementation, period. Remove all ambiguity.
Anyway, LOC count is a fetish that wreakes havoc in language communities like ruby. I'd be more interested in readability and clarity. Show the code to somebody who knows the language only superficially and take the time the person needs to figure out what the code does.
How low do you go before you give up? Silicon atom count?
I'd say that 'LoC using a language plus common libraries at least some developers use in real projects' is the most valid thing to measure.