Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Common Lisp's symbol-name in Clojure?

Is there anything in Clojure that is equivalent to Common Lisp's symbol-name function?

like image 602
Paul Reiners Avatar asked Dec 15 '08 22:12

Paul Reiners


People also ask

What are symbols in Clojure?

There may be some confusion here from the different usages of the term "symbol" in Common Lisp and in Clojure. In Common Lisp, a "symbol" is a location in memory, a place where data can be stored. The "value" of a symbol is the data stored at that location in memory. In Clojure, a "symbol" is just a name.

What is a symbol in Lisp?

In LISP, a symbol is a name that represents data objects and interestingly it is also a data object. What makes symbols special is that they have a component called the property list, or plist.

Is Clojure Common Lisp?

Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. On the other hand, Common Lisp is detailed as "The modern, multi-paradigm, high-performance, compiled, ANSI-standardized descendant of the long-running family of Lisp programming languages".

Is Clojure a Lisp 1?

Since Clojure is a Lisp-1, (global) functions can be dynamically rebound (if they are marked as dynamic).


1 Answers

The Clojure name function will return the name of the symbol, instead of the symbol itself.

(name symbol)

Answer by Stuart Sierra on Clojure group.

like image 53
Paul Reiners Avatar answered Oct 26 '22 06:10

Paul Reiners