More Haskell and Dylan data
Submitted by metaperl on Sun, 10/02/2005 - 1:09am.
The computer language shootout is a good way to compare two languages. I like the Haskell way of breaking a complex task down into functions.
- metaperl's blog
- Login to post comments
The shootout was, if I remember correctly, one of the things that led me to Haskell originally. They had a way to sort programs by number of lines of code, and somehow Haskell always seemed to have the lowest number. It got me intrigued. This was not all that long ago, actually.
Ironically, I don't think that this would work today. So many of the programs on the shootout are so heavily optimized that they don't really illustrate the normal way to solve a problem in a given language anymore. Some of the Haskell examples are so obscure that I can't even figure them out.
Too bad they didn't have a rule that it has to be implemented in the normal way a person using that language would.
Maybe you are looking for the (still in alpha) Shootin?
"So many of the programs on the shootout are so heavily optimized that they don't really illustrate the normal way to solve a problem in a given language anymore."
The shootout can show both optimized programs and slower programs; for example, sum-file shows 2 Haskell programs and the optimized program is 87x faster than the slower program.
We show the programs that people contribute that are for some reason interesting.
I would contemplate adding a criterion (obviously somewhat subjective) for readability, including readability by those who don't know the language. And add a very heavy penalty for comments.
I don't recall the people involved--perhaps it was Ron Jeffries meeting Kent Beck or Martin Fowler--but there was a story about a fellow, mostly unfamiliar with Smalltalk, going in and looking at some code on the CCC project. He was almost floored in that there were virtually no comments, yet he could read the code itself almost as if it were English; it was no work at all to understand. I think that that's really worth something.