Haskell programming language

From Citizendium
Revision as of 20:34, 25 January 2011 by imported>Walter Rorie-Baety (Started the Introduction; working on what/how to continue the article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The Haskell programming language is a general-purpose, purely functional programming language, with lax ("non-strict") semantics and strong, static typing, named for logician Haskell B. Curry. Haskell is best known for three things: 1) adhering almost religiously to the principle of referential transparency, the concept that replacing a function call with the results of the call should not otherwise change the behavior of the program; 2) a semi-official tongue-in-cheek rite-of-passage of writing tutorials in the chosen mechanism Haskell uses to deal with non-determinism, optional results, and especially I/O: monads; 3) a fondness for using names of concepts taken from abstract mathematics, such as the previously mentioned monads. The third point is especially interesting, since Haskell enthusiasts consequently garner criticism for both sides of the practical/abstract divide; "professional" programmers hate the use of short cryptic-looking names for things more usually described with a multi-syllabic class name ending in "-able", while abstract mathematicians are equally quick to point of that Haskell's names for things don't exactly line up with the high-powered math concepts that gave the inspiration. Haskell brings a non-typical whitespace-sensitive layout structure and equational style of function definition, which tends to make its programs look more like math papers that computers understand, than your typical "line noise" look of C or Perl. However, Haskell's lack of distinction between variables and functions, and especially between functions that are or aren't recursive, allows for understandable and surprisingly efficient high-level coding. Haskell also makes heavy use of higher-order functions: functions that take other functions are arguments, and give functions as results. Haskell (the language) is rooted in the observations of Haskell (the mathematician) Curry and his disciples, that "a proof is a program; the formula it proves is a type for the program".