The difference is not only due to identifier length. Haskell's sort is a function in the mathematical sense. By looking at its type, I can see the input and output at a glance and understand how to use it. It's not immediately obvious from the signature of the C++ sort procedure that the "first" and "last" arguments are being used for both input and output. When you abbreviate the identifiers for STL sort it's even less obvious what's going on.
I was surprised that the author thinks the syntax of Haskell is no better than that of C++. Let's look at a typical example. In Haskell, the signature for sort is
sort :: Ord a => [a] -> [a]
which just says that it takes a list of comparable things and returns another list of the same type. Here's the type signature for sort in C++:
template <class RandomAccessIterator, class Compare> void sort ( RandomAccessIterator first, RandomAccessIterator last, Compare comp );
The difference in terseness and clarity is a big reason why I use Haskell when I have a choice.
Have you tried http://disconnect.me/?
GHC 7 can use LLVM as a backend. That might allow generation of JavaScript code from Haskell. There's already ghcjs (https://github.com/sviperll/ghcjs), but the output from that is quite verbose from what I've seen so far.
Update: For OS X you need GHC 7.2 to use the LLVM backend. Otherwise GHC just ignores the -fllvm flag. The Haskell Platform only uses version 7.0.4.
Here's the same table sorted by hours for easier reading:
hours count percent
0-4 7 3
5-20 14 5
20-30 11 4
30-40 42 16
40-50 66 25
50-60 52 20
60-70 35 13
70-80 16 6
80+ 21 8Test driven development would take on a new meaning, with the programmer a writing collection of tests and letting the computer find the shortest program that makes them pass.