Haskell is standardized functional programming language. It uses the principal of lazy evaluation and its name is in honour of the logic Haskell Curry. It evolves very fast and especially because of the Hugs and GHC implementations.

It is a language, that complies with the reference transparency. The same expression or subexpression has on any place in the program the same value.

Another feature of the language is a strict typing of variables. That can simplify detection of the errors in program for programmers. Haskell also fully supports the work with files even with standard inputs and outputs.

Development over time

The history of the language goes to the end of the 80’s in 20th century. It was designed by a team of scientists, who tried to create an open standard of functional programming language with modern features. In 90’s it was still being developed especially in academic sphere. Later, it became known even outside of the science community and that partly because of the online community. As the last stable version figures the Haskell 98 revision, which defines minimal and transferable language standard. It is usable in teaching and it is also a base of other expansions.

How it differs?

Haskell is purely functional programming language. It has a long history and programs in Haskell are a series of high-level generalizable functions, which define, what should the program do. The language hides the low-level operational matters, as e. g. iterations.

It has strong safety of types. The inference system produces code with minimal amount of the side effects. Programmer focuses on the results more than on the formulation of long series of steps.

Compiler produces clean, brief and correct code, therefore if the code is compiled, almost every time it means, that it is functional. That is a huge contrast to e. g. Ruby, where the testing code can take up to double or triple the size of an app and so there is no guarantee of the code being alright.

Strengths of the language shows especially in complex and unique analysis, but the main difference can be seen even at the short scraps of code. E. g. in comparison to Java, it is simpler to understand the meaning of the code at the first sight.

Advantages of using Haskell

  • Availability of libraries. Even though Haskell is not as spread as some of the other languages, it has relatively wide package database named Hackage. Hackage contains probably seven times less than e. g. database of packages for Python, nevertheless it covers relatively wide scale of usage and grows fast.
  • Testing. Cleanliness and lazy evaluation make the testing simple. The testing libraries are often tried on Haskell and then are edited even for Scala or Python. Simultaneously, thanks to the strong and expressive system of static types, exists many things, which are needed to be tested at other languages, but not at Haskell.
  • Speed and parallel processing. The main compiler of Haskell GHC has very efficient code. With the help of optimization with minimal changes of code can in Haskell run as fast as code in C.
  • Reusing the code. Expressive type system and high level of abstraction allow high level of reusing the code. Decreasing the code duplication leads for the developer to the full concentration on building systems and designing algorithms.

Disadvantages of using Haskell

  • Community. According to the fact, that it is a less expanded language, it is tougher to gain information about solution of different problems. Community, e. g. on StackOverflow, is clearly smaller than e. g. for Python, Django or Ruby.
  • The difficulty of learning. Haskell is difficult to learn. It is relatively unusual type of functional programming with academic origin.
  • Laziness. Haskell is a lazy language, which means, that the values are not evaluated, until they are needed to be. That has a lot of benefits, but there can be also problems with the difficulty of analysis of memory use. It happens, that it is needed to solve i. e. space leaks, therefore problems with inadequate consumption of memory. It doesn’t happen very often and the problems can be avoided, yet this type of errors does not occur with other languages.

When to use Haskell?

Haskell is very suitable for algorithm apps and problems, which require parallel solution. It is often used in data-intensive areas, as are the financial services, big data apps, pharmaceutical industry, biotechnology, oil industry or consumer data.