This is a critique of the current 'Haskell Blurb', the first paragraph on
www.haskell.org.
This blurb should, IMO, give a concise description of what Haskell, the
programming language, is, what makes it different from other languages, and
why I should be interested in it.
What it does, instead, is to make me scratch my head and ask myself: what
marketing idiot has written this inclonclusive mumble-jumble of buzz-words?
Let me explain.
"Haskell is an advanced purely functional programming language."
Good start, if only the "advanced" were replaced with something more
characteristic, like "lazy", or "statically typed". Which, BTW, both do not
appear in the whole blurb, even though they are *the* characteristics of
Haskell, lazyness being even something that sets it apart from most other
languages. I hear the marketeers crying "but the average visitor has no
idea what lazyness means". So what? Give them a link to the wiki with an
explanation. So, a better introductory sentence would be
-> "Haskell is a lazily evaluated, purely functional programming language
with a very flexible and powerful static type system."
Next sentence:
"An open source product of more than twenty years of cutting edge research,
it allows rapid development of robust, concise, correct software."
This really gets me every time I read it. How can anyone write such a
nonsense? Haskell is not an "open source product"! It is no product at all.
That most (maybe all) implementations are opens source is certainly an
interesting fact, but IMO not something that should appear at the top of
the page right under the header "The Haskell Programming Language". The
second and third sentences deliberately conflate language and
implementation(s). This is a well known falacy and I am ashamed that it
appears on the front page of my favourite programming language. The blurb
talks about "robust, concise, correct software", but misses itself most of
these goals: it is imprecise, incorrect, and not robust (because
implementations vary), and therefore not a good advertisement, though quite
possibly "rapidly developed".
The blurb promises "rapid development of robust, concise, correct software"
lest one think this were something akin to Perl which certainly allows
rapid development, yet typically neither robust nor correct, especially if
done rapidly. So, how does Haskell differ from that? Well, I'd say this is
where lazyness and a static yet flexible type system come into play. But
no, I forgot, we don't want to explain anything or even be logical, dear
reader, we want to pound slogans into your head!
That cutting edge research is done for Haskell as well as for its
implementations is of course good to know, but just stating it is not
nearly enough: such a statement must be corroberated with evidence,
otherwise it is just idle marketing. (Not that there wouldn't be evidence
amass, it's just that none is given.)
On we go:
"With strong support for integration with other languages, built-in
concurrency and parallelism, debuggers, profilers, rich libraries and an
active community, Haskell makes it easier to produce flexible, maintainable
high-quality software."
Let us take that apart:
(1) Fact: Haskell has a good and very easy to use FFI. To the C language. I
have never heard of integration with any other langauge being directly
supported.
(2) Fact: Built-in concurrency and parallelism is not exactly part of the
langauage, although purity makes it possible to support them in a more
precise and less error-prone way; which is exploited by ghc's concurrency
and parallelism extensions.
(3) Fact: Traditional debuggers are practically useless in Haskell, due to
lazy evaluation. But, oh, we forgot to mention the small fact that Haskell
is lazy. Too bad. Profiling is supported by ghc only (AFAIK), but is
supposed to be very useful (never seriously used it, so I can't judge.)
(4) Fact: there are libraries. Some of them are good, others are not so
good. Most leave a lot to be desired, but I would be hard pressed to come
up with something better myself. What really distinguishes Haskell
libraries from what is found in other languages is the level of
abstraction. I know no other language where stuff like Monad, (Applicative)
Functor, Monoid, Category etc. is *at the heart* of all the libraries. But,
oh, I forgot, we don't want to scare people off, so better not talk about
this in public.
(5) Fact: Haskell has an active community. No question.
(6) Fact: Haskell makes certain things easier (than other languages). Other
things that are easy in other langauges are hard in Haskell. Or at least
very non-obvious. Whether Haskell programs are more flexible, when compared
with dynamically typed OO languages like Python, I seriously doubt.
Maintainable high-quality software is the real selling point, IMO; or
rather *reliably correct* software. However, I cannot see how this
dirtectly follows from the previous points, which is what the sentence is
saying. What has an FFI do to with high quality? What has the supposed
availability of debuggers (where? which?) to do with it?
Enough. I think I have made my point.
Cheers
Ben