You are on page 1of 2

Haskell

Introduction:
Haskell is a computer programming language. In particular, it is a polymorphically statically typed,
lazy, purely functional language, quite different from most other programming languages. The language
is named for Haskell Brooks Curry, whose work in mathematical logic serves as a foundation for
functional languages. Haskell is based on the lambda calculus, hence the lambda we use as a logo.

Haskell is a modern, standard, non-strict, purely-functional programming language. It provides features


including polymorphic typing, lazy evaluation and higher-order functions. It also has an innovative
type system which supports a systematic form of overloading and a module system.
It is specifically designed to handle a wide range of applications, from numerical through to symbolic.
To this end, Haskell has an expressive syntax, and a rich variety of built-in data types, including
arbitrary-precision integers and rationals, as well as the more conventional integer, floating-point and
boolean types.
Following list provides some information about the language:
 Programming paradigm: Functional
 Designed by: Lennart Augustsson, Dave Barton, Brian Boutel, Warren Burton, Joseph Fasel,
Kevin Hammond, Ralf Hinze, Paul Hudak, John Hughes, Thomas Johnsson, Mark Jones, Simon
Peyton Jones, John Launchbury, Erik Meijer, John Peterson, Alastair Reid, Colin Runciman,
Philip Wadler
 First Appeared: 1990;
 Stable Release: Haskell 2010 (July 2010)
 OS support: cross-platform
 files extensions: .hs, .lhs
 compiler: GHC (Glasgow Haskell Compiler)

Haskell offers:
 Substantially increased programmer productivity (Ericsson measured an improvement
factor of between 9 and 25 using Erlang, a functional programming language similar to
Haskell, in one set of experiments on telephony software).
 Shorter, clearer, and more maintainable code.
 Fewer errors, higher reliability.
 A smaller "semantic gap" between the programmer and the language.
 Shorter lead times.
What is functional programming?
C, Java, Pascal, Ada, and so on, are all imperative languages. They are "imperative" in the sense that
they consist of a sequence of commands, which are executed strictly one after the other. Haskell is a
functional language. A functional program is a single expression, which is executed by evaluating the
expression.
Anyone who has used a spreadsheet has experience of functional programming. In a spreadsheet, one
specifies the value of each cell in terms of the values of other cells. The focus is on what is to be
computed, not how it should be computed. For example:
 we do not specify the order in which the cells should be calculated - instead we take it for
granted that the spreadsheet will compute cells in an order which respects their dependencies.
 we do not tell the spreadsheet how to allocate its memory - rather, we expect it to present us
with an apparently infinite plane of cells, and to allocate memory only to those cells which are
actually in use.
 for the most part, we specify the value of a cell by an expression (whose parts can be evaluated
in any order), rather than by a sequence of commands which computes its value.
An interesting consequence of the spreadsheet's unspecified order of re-calculation is that the notion of
assignment is not very useful. After all, if you don't know exactly when an assignment will happen, you
can't make much use of it! This contrasts strongly with programs in conventional languages like C,
which consist essentially of a carefully-specified sequence of assignments, or Java, in which the
ordering of method calls is crucial to the meaning of a program.
This focus on the high-level "what" rather than the low-level "how" is a distinguishing characteristic of
functional programming languages.
Another well-known nearly-functional language is the standard database query language SQL. An SQL
query is an expression involving projections, selections, joins and so forth. The query says what
relation should be computed, without saying how it should be computed. Indeed, the query can be
evaluated in any convenient order. SQL implementations often perform extensive query optimization
which (among other things) figures out the best order in which to evaluate the expression.

You might also like