Haskell is one of the most influential languages and among the most discussed ones. This post is dedicated to the history, and the funny bits, of Haskell. We'll uncover some lesser-known facts along the way, and may even debunk some common misconceptions about the language.
Haskell is often remembered through its most visible ideas: laziness, purity, type classes, monads, and intimidating memes. But historically, it began more modestly: as a consolidation project for a crowded field of lazy functional languages. This post is, in big part, about how some of Haskell's accidents became its identity.
Despite its modern appearance, Haskell is actualy pretty old. The starting point is 1987, the year when a small group of PL researchers met in Portland to discuss the state of the field. The pre-Haskell world was a small Tower of Babel. There was Miranda, Lazy ML, Orwell, Alfl, Id, Clean, Ponder, Daisy, and more. Many of them were serious languages with interesting ideas, but most were local to one research group. The awkward part was that they were not obviously different enough to justify all this duplication. As the Haskell history paper puts it, they were "all roughly the same, bar the syntax".
Quickly the group converged on understanding that the field needed a common language. The most obvious solution was not necessarily to invent that language from scratch, there already was a natural candidate, Miranda. It was already the mature lazy functional language of the time, and Haskell would later borrow heavily from its general shape. But Miranda was a product of Research Software Ltd., and its author, David Turner, did not want the committee to simply turn it into an open, community-controlled standard. So the committee did the next best thing: they designed a new language. In that sense, Haskell was born not only from language design, but also from licensing, portability, and community mechanics.
As soon as the design process began, an effort to find new and exciting ways to implement it had started. Since Haskell is lazy, existing implementations, at the time, were based on graph reductions, and were inspired by a great work on SKI combinators -- the topic for which Haskell Curry is most known for. And the solution that Haskell adopted, and uses to this day, was the Spineless Tagless G-Machine, a virtual machine (as in JVM) quite similar to those that already existed -- the "G" stood for "Graph", after all.
Since the infamous lecture of John Backus in 1978, it was clear to all that procedural programming is about dead, and everyone was looking in the direction of functional. So on the desing side, apart from the mentioned laziness, it was set that Haskell must be functional. But how functional it really was? Note that the word has changed its meaning over time. The canonical example of a functional language then was APL, which John Backus used in his lecture. As for Haskell, it was really not much more functional than many of the existing Lisps.
Laziness was another thing, that although differentiated Haskell from Lisp, still wasn't its unique feature, but it was the thing that essentially forced the language to be pure. And in the beginning, purity was perceived as nothing but an obstacle, something that the creators were themselves embarrassed about.
The design process continued in a context of a committee.
To quote the authors:
But anyways, the design was complete in three years, and resulted in a report.
This is what authors say about the date:
> Was Haskell a joke? On the technical side, the most distinctive and valuable contribution of Haskell were type classes, as judged by its creators. Type classes is a particular way to add polymorphism to functions, similar to interfaces and generics.
And as a solution to the purity problem, there were monads.
Notably, the original solution, described in the report,
was based on continuations (completely differrent idea),
and monadic I/O was introduced only in 1992.
Now monads is the thing Haskell is known for,
and as authors themselves write:
But long time has passed since, what is Haskell today? First and most unfortunate, Haskell aged. And as defined by the Linus' law -- when programs age, they get bigger, and no popular language has avoided this fate, not even Haskell. Almost a hundred "extensions" are now available to enable specific features of the language.
Another consequence of aging, is that some desing choices become obsolete. Monads were Haskell's famous answer to effects, but they are no longer the only attractive story: algebraic effect handlers offer a different way to structure effectful programs.
One of the most overlooked strong sides of Haskell is its meme-generating potential. Over the years, the Haskell community has come up with such iconic phrases as "Monad is just a monoid in the category of endofunctors", "Monads are burritos", "Avoid success at all costs", and "Haskell will make you a better programmer".
For a more detailed history of haskell, there is a great write up
from the founding fathers:
link.
All the quotes are taken from it.
return home