Hacker News new | past | comments | ask | show | jobs | submit login

What do you mean by "densest"?

Please give us a URL to the benchmarks game web page that you think shows Python is the densest language.

>>I don't make type errors when writing the first version of a piece of code<<

Maybe you just don't test the first version well enough :-)




I was going by http://shootout.alioth.debian.org/u64q/which-language-is-bes... . (the most naive/obvious approach - all benchmarks have weight 1, code size has weight 1, other factors have weight 0). I know it measures gzipped code size; I think that's a reasonable measure for "density".

Looks like I'm out of date, ruby 1.9 has overtaken python. Guess it's time to learn ruby.


Caveat lector -- http://shootout.alioth.debian.org/help.php#comparecodeused

"This paper [pdf The Effect of Language Choice on Revision Control Systems] compares one scripting language, Python, with C in the domain of revision control systems, as large working implementations exist for both languages. It finds no clear evidence that scripting languages produce smaller systems…"

http://plg.uwaterloo.ca/~migod/846/2011-Winter/projects/Simo...


That chart doesn't show what you think it shows.

> Remember - these measurements are just of the fastest programs for each of these programming language implementations

If you add in speed, even at a size:speed weight of 5:1, Python's advantage disappears.

So, the fastest python code is smaller and slower than the fastest haskell code, ignoring any slower code that may be denser.

Also, "gzipped code size" is a horrible measure of density: what everyone hates about Java is how redundant programs are (access modifiers, type declarations), which gzip would compress nicely, but doesn't help programmers (except where Eclipse auto-completes, I guess).


>> a horrible measure of density <<

Now we know you find it unpleasant, please name your preferred measure and explain why you think it would be better for comparing programs written in very different languages, with widely different source code styles and conventions.

Incidentally, do you think much Java or C# gets written with Notepad? :-)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: