Tue May 22 22:34:16 CEST 2007

unknown.png Haskell: Advantages

At the end of our Haskell excurs I would like to list some advantages of this really nice functional language.

  • You can write mathematical functions in Haskell in the same way like you did before.
  • In the end everything is a function.
  • The lazy evaluation is a really nice feature because you can write undefined values for example into lists and can evaluat the rest nevertheless. That can helps you in any case because the values are not calculated before you really need them.
  • You can proof any function in Haskell really fast because it bases of mathematical functions. So you can make induction (of the structure) on the base.
  • The input and output is handled through monads. But in my opinion we lost some advantages of the functionality with input/output because we must define when it should happens, so it is iterative somehow.
  • You can write your own data types and put it into the default classes easily. For example you can compare "Monday" with "Thursday" and Haskell will tell you that it's bigger (if you put your data type weekday into Ord).
  • Another feature of Haskell is the possibility to use list comprehensions to creat a list based on existing lists.
  • And you can use the lamda calculus to use functions without giving them explicit names. So it's easier to handle big formulas.

Posted by Sebastian Wieseler | Categories: studies, projects/programming |