Clojure

From Just Solve the File Format Problem
Revision as of 19:42, 17 June 2022 by Dan Tobias (Talk | contribs)

Jump to: navigation, search
File Format
Name Clojure
Ontology
Extension(s) .clj, .edn

Clojure is a programming language based on LISP. It is designed for multithreaded applications with mutable and immutable data structures, and has implementations that run under Java or JavaScript. As with other Lisps, Clojure treats program code like data, making self-modifying code easy to develop. Functions in Clojure can be passed as arguments, and returned as values, by other functions.

While Clojure is a compiled language rather than an interpreted one, so there is no such thing as a "Clojure interpreter", in practice there are command line shells freely available that immediately compile any Clojure expressions typed in immediate mode and output their result, giving the "instant gratification" useful in climbing the learning curve when getting started in the language, a characteristic it has in common with old-time home computer BASICs as well as some newer languages like Python.

The concepts and terminology used in Clojure includes "arity", the number of parameters a function takes (you can define a function with different functionality depending on what arity it is given in a particular invocation) and "closures", referring to a function enclosing temporary functions and variables that are only in scope within the outer function, but have continued presence via their use in the outer function which can be invoked elsewhere.

.clj is the normal extension for Clojure programs, and .edn is also found in reference to Extensible Data Notation, a format used to express data used by Clojure (including programs themselves, which are merely a form of data).

Links

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox