Skip to content

GerardPi/clojure-docs

Repository files navigation

Clojure Documents

1. Introduction

This is information and links about the Clojure programming language. This reason for this document is mainly for myself so I don’t have to remember all of these details.

2. Why is Clojure such a nice idea

  1. State and identity are not conflated

    • Usually everything you do in Clojure is immutable

      • That is usually not a problem thanks to structural sharing

      • When mutability really is required (no place oriented programming)

      • It means that usually a location in memory holding a location will not be changed after it is allocated. Place Oriented Programming is a form of premature optimization.

    • When you must have mutable stuff, that state can be managed really well:

      • Atoms

      • Agents

      • Refs and Software Transactional Memory

      • Locks

      • Future, Promise

      • CSP (core.async)

  2. Dynamically typed (compile time) and strongly typed (run time) language makes for more readable code.

    • However, you can add type hints for performance reasons (static typing).

  3. Code is data and data is code (homoiconicity)

  4. Very clean code without much ceremony

    • You can do the same in C++ or Java. But is it less readable.

Downside of Clojure: it’s pretty strange coming from any mainstream imperative programming language.

4. References

  1. Excellent introduction to Clojure: https://grison.me/2020/04/04/starting-with-clojure/

  2. Building a Drug Dealer API

  3. Much informatio nabout Clojure cli tools

  4. Hosted on the JVM: https://www.clojure.org

  5. Hosted by JavaScript: https://clojurescript.org

  6. Hosted by .Net runtimes (CLR): https://github.com/clojure/clojure-clr

  7. https://search.maven.org/

    • Get Clojure from this Maven repository

  8. https://clojars.org/

    • Rest of the Clojure libraries can be found here

  9. https://oli.me.uk/clojure-projects-from-scratch/

  10. https://tirkarthi.github.io/clojure/2017/12/11/clj-tools-repl.html

  11. https://curiousprogrammer.net/

  12. https://www.booleanknot.com/

  13. https://www.clojure-toolbox.com/

  14. https://practicalli.github.io/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published