[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Interesting essay
- From: Tony Finch <dot@...>
- Date: Mon, 18 Apr 2011 19:51:13 +0100
Fabio Mascarenhas <mascarenhas@acm.org> wrote:
> On Mon, Apr 18, 2011 at 9:06 AM, Martin Guy <martinwguy@gmail.com> wrote:
> >
> > One man designed and wrote the language that Haskell is an
> > all-but-exact copy of. They then wrapped it in libraries, someone
> > designed a proper I/O mechanism for it and some "module" interface I
> > think. Hardly anything requiring talent or academia.
>
> The original article is full of hyperbole, but "teams of academics" is
> closer to the truth about Haskell than your version, see the "History
> of Haskell" paper:
>
> http://research.microsoft.com/en-us/um/people/simonpj/papers/history-of-haskell/index.htm
>
> BTW, the first version of the Haskell spec did not have monads, but
> had two different ways to do I/O, streams and continuations. The
> module system also came later. Perhaps you are making confusion with
> type classes, which were in the language from the start, and would be
> the biggest deviation from Miranda. But I would hardly call type
> classes as something "hardly requiring talent or academia". :-)
>
> Sorry for the "somebody is wrong on the internet" off-topic message...
Yes. I have never read anyone so blatantly ignorant about Haskell.
Miranda is a much smaller language than Haskell. It's basically the syntax
of Hope combined with the type system of ML and lazy evaluation
implemented using combinator reduction. The latter was the really key
innovation because it led to all the subsequent research in compiling lazy
functional languages - but that research happened in languages other than
Miranda becausse David Turner would not allow anyone else to work on it.
Haskell was not supposed to be an innovative language itself - it was just
supposed to be a straight-forward standardized combination of several very
similar lazy languages. It would provide a common platform for teaching
and research, rather than being novel itself.
But they needed to solve the problem of ad-hoc polymorphism, which led
Wadler to invent type classes. And they needed to solve the problem of IO
in a non-strict language (which up until that point had made such
languages usable only for toy problems) so the type class system was
extended. Haskell's ffi hooks into its IO system very nicely. There has
been a lot more type system research in subsequent years which has led to
some really nice support for generic programming - check out the "scrap
your boilerplate" papers - and for software transactional memory. The
extensions combine to make Haskell a great language for type-level
programming (if you like making C++ boost programmers envious).
Haskell has also been a platform for research into compiling functional
programs, especially type-directed optimizations. jhc is a notable one-man
Haskell implementation that uses deep theory to get blazing performance.
There's also Data Parallel Haskell which is some really promising work on
automatic vectorization of recursive array algorithms.
So that's what you need teams of talented academics for.
Tony. (http://www0.us.ioccc.org/years.html#1998_fanf)
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Rockall, Malin, Hebrides: South 5 to 7, occasionally gale 8 at first in
Rockall and Malin, veering west or northwest 4 or 5, then backing southwest 5
or 6 later. Rough or very rough. Occasional rain. Moderate or good,
occasionally poor.