What is the difference between Clojure, circuitry / missiles, and common Lisp?

I know that these are dialects of the same family of languages ​​as lisp, but what exactly are the differences? Could you give an overview, if possible, covering topics such as syntax, characteristics, functions and resources.

+83
lisp clojure scheme racket common-lisp
Jun 27. 2018-12-12T00: 00Z
source share
4 answers

They all have a lot in common:

  • Dynamic languages
  • Heavily printed
  • Compiled by
  • Lisp is a stylish syntax, that is, code is written in the form of Lisp data structures (forms), and the most common pattern is function calls, such as: (function-name arg1 arg2)
  • Powerful macrosystems that allow you to process code as data and generate arbitrary code at runtime (often used to "expand the language" using new syntax or creating DSL)
  • Often used in the style of functional programming, although it has the ability to place other paradigms
  • Emphasis in interactive development using REPL (i.e. you are interactively developing in an executable code instance)

Common Lisp salient features:

Clojure features:

  • The largest library ecosystem, as you can directly use any Java library.
  • Vectors [] and maps {} used as a standard in addition to standard lists () - in addition to the general utility of vectors and maps, some consider this an innovation that makes it generally more readable.
  • More focus is on immutability and lazy functional programming, somewhat inspired by Haskell.
  • Strong concurrency capabilities supported by language-level transactional programming memory (worth a look: http://www.infoq.com/presentations/Value-Identity-State-Rich-Hickey )

Features of the circuit:

+77
Jun 27 2018-12-12T00:
source share

The people above have missed a few things

  • Common Lisp also have vectors and hash tables. The difference is that Common Lisp uses # () for vectors and has no syntax for hash tables. The circuit has vectors, I suppose

  • Common Lisp have reader macros that allow the use of new brackets (like Racket, a descendant of the circuit).

  • Scheme and Clojure have hygienic macros, unlike Common Lisp unhygienic

  • All languages ​​are modern or have extensive reconstruction projects. General Lisp has received extensive libraries over the past five years (mainly thanks to Quicklisp), Scheme has some modern implementations (Racket, Chicken, Chez Scheme, etc.), and Clojure was created relatively recently

  • Common Lisp has an integrated OO system, although it is very different from other OO systems that you could use. It is noteworthy that it does not apply - you do not need to write OO code.

  • Languages ​​have slightly different design concepts. The circuit was designed as a minimal dialect for understanding the Actor Model; later it began to be used for pedagogy. Generic Lisp was designed to combine the myriad dialects of Lisp that arose. Clojure was developed for concurrency. As a result, Scheme has a reputation for being minimal and elegant, Common Lisp for being powerful and agnostic paradigm (functional, OO, any) and Clojure in favor of functional programming.

+43
Sep 16
source share

Remember the differences between Lisp -1 and Lisp -2.

Scheme and Clojure: Lisp -1:
This means that the names of variables and functions are in the same namespace.

Common Lisp - Lisp -2:
Functions and variables have different namespaces (in fact, CL has many namespaces).

+30
Jun 28 '12 at 10:41
source share

Gimp is written in the diagram :)

In fact, all the software, which, according to some people, could be written in C ++, may have been made under the umbrella of Lisp, it is difficult to distinguish golden apples from the group. The fact is that C ++ has not always been popular; it seems popular today due to the history of updates. For less than half a century, C ++ has not even used multithreading, which is where Python today is the cesspool of useless unverified buggy glue code. Fasterforward is a bit, and now we are seeing an increase in functional programming, it is more like adaptation or death. I think Java has the right to adapt.

The scheme was designed to simplify the Lisp language, it was his only intention, except that he was never caught. I think Clojure is doing something similar to simplify the schema for the JVM. It is just like any other JVM language to inflate the user interface, only to simplify the writing of the template in Java lands.

+1
Feb 24 '16 at 3:41
source share



All Articles