[Haskell-cafe] code length in Haskell, a comparison

KC kc1956 at gmail.com
Tue Nov 20 05:34:05 CET 2012


I am leery of code comparisons (but not Timothy Leary of them).

Clojure being a JVM language has the advantage of the massive Java
class libraries.

If Haskell could tie in fairly seamlessly to the Java class libraries ...

If more developers learned the need for finer grained abstraction ...



On Mon, Nov 19, 2012 at 7:55 PM, Gregory Guthrie <guthrie at mum.edu> wrote:
> There is some interesting data in the article at:
>
>    Code Length Measured in 14 Languages
>     http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/
>
> basically comparing program lengths in various languages, and some ensuing discussion of how this relates to language expressiveness, etc.
> (He does all of his analysis in Mathematica, which is the goal of the article.)
>
> It is interesting to see how well Haskell showed in the data; and it would also be interesting to see how well it could replicate the analysis example which was a nice example of web data scraping!
>
> The data is the length of a series of programs written in a number of languages (data from: http://rosettacode.org/wiki/Rosetta_Code).
> (The columns don't map well to text only, Haskell column marked with ≡≡≡≡ (Why doesn't this list support HTML?)).
>   See nicer version at: http://pastehtml.com/view/ciy7woohv.rtxt
>
> The average for Haskell of 1.89 means that on the average the same program in Haskell takes ~2x in the other languages.
> Given the correlation of size to clarity, complexity, effort, and errors, this is a good thing! :-)
>

Massive Snip!

>
> Overall Ranking:
>    Clojure              0.41
>    Haskell              0.83
>    R                    0.85
>    MATLAB               1.14
>    JavaScript           1.27
>    Ruby                         1.36
>    Common Lisp          1.56
>    Python               1.61
>    C++                  1.68
>    C#                   1.85
>    Pascal               1.86
>    Fortran              2.33
>    C++                  2.58
>    C                    4.09
> -------------------------------------------
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



-- 
--
Regards,
KC



More information about the Haskell-Cafe mailing list