# Differences between names and symbols, vars and bindings, forms and expressions

**URL:** https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844
**Category:** General Questions
**Tags:** clojure, beginner
**Created:** [March 6, 2023, 7:28pm UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844 "2023-03-06T19:28:19Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![avidrucker](https://clojureverse.org/user_avatar/clojureverse.org/avidrucker/32/3294_2.png) [@avidrucker](https://clojureverse.org/u/avidrucker)
#### Post date: [March 6, 2023, 7:28pm UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/1 "2023-03-06T19:28:19Z")

</div>

What is the relationship hierarchy between these things in Clojure?

1. forms and expressions
2. vars and bindings
3. symbols and names

I recall reading somewhere that forms are a more generalized way of referring to both expressions and special forms, but I am not confident that this is the case. If it is, are there forms that are neither expressions nor special forms, and what might those be?

My understanding is that def and let can be rebound, and that, while not generally best practice to do so, this means that they are Vars, as in, variables, that can change. Does Clojure have true constants, that once set, can never be changed, such as a JavaScript `const my_var = 25`? If we generally do not call def and let variables, then what is/are the preferred way(s) to call them; bindings, names, or something else?

Last but not least, I am still unclear about the relationship between names and symbols. Is there overlap where all names are symbols, or all symbols are names, or is the relationship different than these? On that note, I wonder if “names” and “identifiers” are interchangeable terms in Clojure 🤔

Thank you for helping me to clarify!

Ps. I found that reading on the Clojure website and in Clojuredocs wasn’t particularly helpful to me in answering these questions. I don’t know what I don’t know, and it’s quite possible that I missed something while reading through the above resources.

---

<div class="post-metadata">

### Author: ![dave.liepmann](https://clojureverse.org/user_avatar/clojureverse.org/dave.liepmann/32/5211_2.png) [@dave.liepmann](https://clojureverse.org/u/dave.liepmann)
#### Post date: [March 7, 2023, 6:04am UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/2 "2023-03-07T06:04:05Z")

</div>

> [@avidrucker](#):
>
> My understanding is that def and let can be rebound, and that, while not generally best practice to do so, this means that they are Vars, as in, variables, that can change. Does Clojure have true constants, that once set, can never be changed, such as a JavaScript `const my_var = 25`?

I don’t think such a thing is readily available, and it if were, I’d prefer not to use it because it would be an obstacle to interactive development. I need to re-define the functions and values held by vars as I refine my understanding of what I’m building. I seem to remember that this was explicitly stated as Rich’s rationale for vars but can’t find it today except for “Functions defined with defn are stored in Vars, allowing for the re-definition of functions in a running program.” on the [vars reference](https://clojure.org/reference/vars) page.

I feel like Clojure’s convention & immutable data structures solve the same problem constants aim to ameliorate in JavaScript.

> If we generally do not call def and let variables, then what is/are the preferred way(s) to call them; bindings, names, or something else?

I call the result of a `def` a “var” and the result of a `let` a “binding” or a “local symbol”. I think this is supported by the [special forms reference](https://clojure.org/reference/special_forms).

> [@avidrucker](#):
>
> Is there overlap where all names are symbols, or all symbols are names, or is the relationship different than these?

I’m not precisely clear what “name” means in this context. (For instance, a keyword has a [name](https://clojuredocs.org/clojure.core/name), but I suspect that’s not what you mean.) I think the straightforward answer is that yes, names (as in, identifiers for vars) are symbols (per the [reader](https://clojure.org/reference/reader#_symbols)).

---

<div class="post-metadata">

### Author: ![avidrucker](https://clojureverse.org/user_avatar/clojureverse.org/avidrucker/32/3294_2.png) [@avidrucker](https://clojureverse.org/u/avidrucker)
#### Post date: [March 8, 2023, 2:04pm UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/3 "2023-03-08T14:04:52Z")

</div>

This is a very helpful answer, thank you. I especially appreciate your use of references. After working with Clojure for some time, I sometimes forget where I get my ideas/knowhow from, and desire to ask myself, “How do I know that what I believe to be true is indeed actually true?”

Here are my takeaways:

- def makes vars
- let makes bindings
- names are identifiers for things such as vars and keywords
- immutability can help a lot in problem solving, but without _any_ mutability, problem solving could become especially difficult/inconvenient

---

<div class="post-metadata">

### Author: ![avidrucker](https://clojureverse.org/user_avatar/clojureverse.org/avidrucker/32/3294_2.png) [@avidrucker](https://clojureverse.org/u/avidrucker)
#### Post date: [March 15, 2023, 11:34am UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/4 "2023-03-15T11:34:36Z")

</div>

I tried asking the new ChatGPT-4 [“Is everything in Clojure a form, or an expression?”](https://shareg.pt/byQk0DN)

@dave.liepmann May I ask for your help to validate the accuracy of the chat model’s answer?

---

<div class="post-metadata">

### Author: ![dave.liepmann](https://clojureverse.org/user_avatar/clojureverse.org/dave.liepmann/32/5211_2.png) [@dave.liepmann](https://clojureverse.org/u/dave.liepmann)
#### Post date: [March 15, 2023, 12:27pm UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/5 "2023-03-15T12:27:51Z")

</div>

Far be it from me to disagree with our new 🤖 overlords!

Seems OK to me, per [https://clojure.org/reference/evaluation:](https://clojure.org/reference/evaluation:)

> Clojure programs are composed of expressions. Every form not handled specially by a special form or macro is considered by the compiler to be an expression, which is evaluated to yield a value.

---

<div class="post-metadata">

### Author: ![system](https://clojureverse.org/uploads/default/original/2X/5/51079bf9e4b7d9466242c06cf1e43b9f8bd6da14.png) [@system](https://clojureverse.org/u/system)
#### Post date: [September 14, 2023, 12:28am UTC](https://clojureverse.org/t/differences-between-names-and-symbols-vars-and-bindings-forms-and-expressions/9844/6 "2023-09-14T00:28:13Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
