Revision as of 12:00, 29 February 2008 by DekuDekuplex
1. What is the purpose of Clean?
The purpose of Clean is to serve as a non-strict, purely functional programming language with the following advantages over similar functional programming languages:
- Efficient running-time of compiled code: Clean is one of the fastest functional programming languages. For many applications, Clean is appreciably faster than Haskell, and at least on par with OCaml. According to a Gentoo benchmark, the current Clean entry runs the meteor-contest benchmark 2.6 times faster than the corresponding Haskell GHC entry.
- Easy optimization of code: According to at least one user on Stay Hungry, Stay Foolish - Blog, Clean code can be easier to optimize than Haskell code. Also, according to one user on Nabble - Haskell - Haskell-Cafe - Why can't Haskell be faster?, "[T]he Clean type system gives more information to the compiler than the Haskell system does. The Haskell type system doesn't say that a certain value can be updated in-place or that a certain value should not be boxed (not counting the GHC extension for unboxed types)." (quote by Reinier). In addition, according to another user there, "[C]lean's uniqueness types allow for a certain kind of zero-copy mutation optimisation which is much harder for a haskell compiler to automatically infer." (quote by Jules).
- For discussions on how Clean optimizes its code vs. Haskell, see the following: