Advantages of functional programming languages

From Clean
Jump to navigationJump to search

Both for managers and software constructors there are several good reasons to use Clean for the development of applications. On this page we show that this is important for the actual software developer as well as the manager.

The advantages of a functional programming language like Clean can also be stated as:


Given a collection of correct expressions, these expressions can easily be combined into a larger correct expression. The same holds for functions: a collection of functions designed to perform a sub-task can easily be combined to a function performing a more complicated task. When we look the other way around this is: each non-primitive element of a Clean program is composed in an clear way of a small number of elements. Pleas note the difference between this meaning of modular and the fact that Clean has an advanced module-system


The strong type system guarantees that languages components can only be combined in sensible ways. Since this principle is applied uniform from individual language elements up to the entire program, no run-time type problem can ever occur in a program that is approved by the Clean compiler.


There are four aspects of efficiency involved:

  • Algorithms can be programmed fast
  • Algorithms are expressed in a small number of lines
  • Programs are compiled extremely fast
  • Applications written in Clean are executed efficiently
  • Using Clean and the Clean development system you will gain a high efficiency in all these areas

Wide spectrum

Despite the high level of abstraction, Clean is not tuned for a particular narrow application area. On the contrary; Clean is applied successfully in a wide number of application areas (like compilers, editors, drawing tools, traffic control systems, database-like systems, games etcetera).


Due to the high level of abstraction, programs in Clean are very clear. In general programs in Clean look more like an (executable) specification than like a traditional program. This makes it much easier to understand what the program does. This causes people to write better programs. Moreover, it is very well possible to change existing programs, or to reuse (parts) of existing programs.

As a consequence software developed in Clean is:

  • Very reliable
  • Efficiently developed: a short time-to-market
  • Clear and compact
  • Easy to extend and change
  • Suited for reuse

This results in a number of attractive properties for managers of projects using Clean as well as for the programmers working in these projects.

Why is Clean important for a manager?

Using Clean you are able to deliver a high quality product in a shorter time.

The lack of side effects makes reuse and changing programs easy. This makes it possible to use evolutionary program development and to reduce the cost of projects similar to previous products.

Software developers using Clean have a high productivity. You can develop products cheaper.

Software developers tend to enjoy using Clean. This implies that they do their job better, and are more likely to stay in your team.

Using Clean projects becomes better manageable, cheaper and their quality improves! You really can make better things.

Why is Clean important for a software developer?

Functional programming solves a lot of boring and time consuming programming problems (memory management, initialization of data, determining the order of actions,...) for you. This implies that you can concentrate on developing the algorithm you want to implement instead of wasting your time on nasty details.

The strong type system of Clean performs a lot of consistency checks automatically. In traditional programming languages these checks should be performed manually by extensive testing. This is error-prone, time-consuming and boring.

The powerful type system (type classes, overloading, polymorphism, tailor made algebraic data types, higher order functions,...) allows you to express yourself concise and enables reuse.

Powerful language constructs enables terse and very clear programs. For example; the list comprehensions of Clean can be viewed as a much more flexible and generalized version of SQL that is completely integrated within the language.

As a consequence programming in Clean is fun, effective and efficient. Using Clean projects becomes better manageable, cheaper and their quality improves!

Application areas

Clean is a general purpose programming language. This implies that it can be used instead of the programming language you are currently using (e.g. C, C++,...). Although Clean has some similarities with rapid programming tools, it is not such a tool. Since Clean is a general purpose programming language it has a much wider applicability.

Currently most applications of Clean are in rather technical areas (control systems, measurement tools, simulators, compilers, etc.) and in GUI-programs (editors, development tools, etc.). This has two reasons. First, the programs in these areas are often complex. So, there is a need for powerful programming languages. Second, people working in these areas work are more used to pick up new technologies.