e01.org

Clean (programming language)

Clean is a general-purpose purely functional programming language. Originally called the Concurrent Clean System or the Clean System, it has been developed by a group of researchers from the Radboud University in Nijmegen since 1987. Although development of the language has slowed, some researchers are still working in the language. In 2018, a spin-off company was founded that uses Clean.

Clean is a general-purpose purely functional programming language. Originally called the Concurrent Clean System or the Clean System, it has been developed by a group of researchers from the Radboud University in Nijmegen since 1987. Although development of the language has slowed, some researchers are still working in the language. In 2018, a spin-off company was founded that uses Clean. ==Features== Clean shares many properties and syntax with a younger sibling language, Haskell: referential transparency, list comprehension, guards, garbage collection, higher order functions, currying, and lazy evaluation. However, Clean deals with mutable state and input/output (I/O) through a uniqueness type system, in contrast to Haskell's use of monads. The compiler takes advantage of the uniqueness type system to generate more efficient code, because it knows that at any point during the execution of the program, only one reference can exist to a value with a unique type. Therefore, a unique value can be changed in place. An integrated development environment (IDE) for Microsoft Windows is included in the Clean distribution. An extension for Visual Studio Code also exists that integrates with Eastwood, the language server for Clean. ==Examples== Hello world: Start = "Hello, world!" Factorial: Fibonacci sequence: Infix operator: (^) infixr 8 :: Int Int -> Int (^) x 0 = 1 (^) x n = x * x ^ (n-1) The type declaration states that the function is a right associative infix operator with priority 8: this states that x*x^(n-1) is equivalent to x*(x^(n-1)) as opposed to (x*x)^(n-1) . This operator is pre-defined in StdEnv, the Clean standard library. ==How Clean works== Computing is based on graph rewriting and reduction. Constants such as numbers are graphs and functions are graph rewriting formulas. This, combined with compiling to native code, makes Clean programs which use high abstraction run relatively fast according to The Computer Language Benchmarks Game. A 2008 benchmark showed that Clean native code performs similarly to the Glasgow Haskell Compiler (GHC), depending on the benchmark. ==Compiling== Compilation of Clean to machine code is performed as follows: Source files (.icl) and definition files (.dcl) are translated into Core Clean, a basic variant of Clean, by the compiler frontend written in Clean. Core clean is converted into Clean's platform-independent intermediate language (.abc), by the compiler backend written in Clean and C. Intermediate ABC code is converted to object code (.o) by the code generator written in C. Object code is linked with other files in the module and the runtime system and converted into a normal executable using the system linker (when available) or a dedicated linker written in Clean on Windows. Earlier versions of the Clean compiler were written completely in C, thus avoiding bootstrapping issues. ==Platforms== Clean is available for Microsoft Windows (IA-32 and X86-64), macOS (X86-64), and Linux (IA-32, X86-64, and AArch64). Some libraries are not available on all platforms, like ObjectIO which is only available on Windows. Also the feature to write dynamics to files is only available on Windows. The availability of Clean per platform varies with each version: ==Comparison to Haskell== The syntax of Clean is very similar to that of Haskell, with some notable differences. In general, Haskell has introduced more syntactic sugar than Clean: ==References== ==External links== Clean Wiki clean-lang.org: public registry with Clean packages cloogle.org: a search engine to search in Clean packages

References

  1. ^ "base-compiler" . clean-lang.org . Retrieved 5 September 2026 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  2. ^ "Home" . TOP Software Technology . Retrieved 26 November 2021 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  3. ^ "Clean for Visual Studio Code" . marketplace.visualstudio.com . Retrieved 6 September 2026 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  4. ^ Jansen, Jan Martin; Koopman, Pieter; Plasmeijer, Rinus (2008). "From Interpretation to Compilation" (PDF) . FTP server ( FTP ) . Retrieved 21 May 2016 . [ dead ftp link ] (To view documents see Help:FTP ) Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  5. ^ Koopman, Pieter (10 December 1990). Functional Programs as Executable Specifications (PhD). Katholieke Universiteit Nijmegen. p. 35. ISBN 90-9003689-X . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  6. ^ "Clean and iTasks / ABC Interpreter · GitLab" . Clean and iTasks on GitLab . Retrieved 13 April 2023 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  7. ^ Staps, Camil; van Groningen, John; Plasmeijer, Rinus (15 July 2021). "Lazy interworking of compiled and interpreted code for sandboxing and distributed systems". Proceedings of the 31st Symposium on Implementation and Application of Functional Languages . pp. 1– 12. doi : 10.1145/3412932.3412941 . ISBN 9781450375627 . S2CID 202751977 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  8. ^ "Release history" . Clean . Retrieved 7 January 2022 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  9. ^ "Index of /Clean" . Retrieved 7 January 2022 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  10. ^ "Download Clean" . Clean . Retrieved 23 July 2019 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  11. ^ "Idris - Uniqueness Types" . Retrieved 20 November 2018 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  12. ^ "Clean 0.7: Readme" . Archived from the original on 24 May 2019. Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  13. ^ "Clean 1.0: Readme" . Archived from the original on 5 May 2019. Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  14. ^ "Clean 1.3: Readme" . Archived from the original on 27 April 2019. Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  15. ^ "Radboud University Nijmegen: Department of Software Science: Software" . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  16. ^ "FAQ" . Clean . Retrieved 26 November 2021 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  17. ^ "Publications" . Clean . Retrieved 26 November 2021 . Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  18. ^ a b "FTP link" (PDF) . ftp.cs.ru.nl ( FTP ). [ dead ftp link ] (To view documents see Help:FTP ) Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
  19. ^ "Which programming languages are fastest?" . Computer Language Benchmarks Game . Archived from the original on 28 June 2011. Wikipedia revision 1375189704, retrieved 2026-11-20 · 1795129200.0
source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Clean (programming language)". 1789543908. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1375189704

JSON record · API collection · citation policy