# What do people mean with "reified"?

**URL:** https://clojureverse.org/t/what-do-people-mean-with-reified/8765
**Category:** General Questions
**Tags:** clojure
**Created:** [March 27, 2022, 9:20pm UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765 "2022-03-27T21:20:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jgomo3](https://clojureverse.org/user_avatar/clojureverse.org/jgomo3/32/1523_2.png) [@jgomo3](https://clojureverse.org/u/jgomo3)
#### Post date: [March 27, 2022, 9:20pm UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/1 "2022-03-27T21:20:30Z")

</div>

In the home page of [clojure.org](https://clojure.org/), there is a “Features” section, which includes “Dynamic Development”.

It explains “Dynamic Development” in terms of “reified constructs”:

> Almost all of the language constructs are reified, and thus can be examined and changed.

It is redacted as if just by mentioning “reified” you should get the idea… But I don’t get it.

What does that mean?

---

<div class="post-metadata">

### Author: ![seancorfield](https://clojureverse.org/user_avatar/clojureverse.org/seancorfield/32/195_2.png) [@seancorfield](https://clojureverse.org/u/seancorfield)
#### Post date: [March 27, 2022, 10:33pm UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/2 "2022-03-27T22:33:18Z")

</div>

The dictionary definition of `reify` is “to consider or make some abstraction more concrete or real”.

The usage in the features section is meant to convey that everything in a Clojure program can be manipulated in the REPL with Clojure itself: we can look at the source, at the metadata, at the types behind any object, at all aspects of the data itself – and we can modify definitions on the fly, changing or building the program up dynamically, live in the REPL.

Many (most?) other languages don’t provide all of this _dynamically_ in a way that you can inspect and modify it all, in a running program, using the same language and semantics that you are writing your program in. If they provide it at all, you often need to use additional tools or additional semantics that are outside of the core programming language.

Stu Halloway has a great slide in his REPL-Driven Development talk, about six minutes in, where he compares the Clojure REPL to the interactive Java shell as an example of the dynamic aspects of Clojure compared to the “pour concrete” of many other languages.

See [talk-transcripts/REPLDrivenDevelopment.md at master · matthiasn/talk-transcripts (github.com)](https://github.com/matthiasn/talk-transcripts/blob/master/Halloway_Stuart/REPLDrivenDevelopment.md)

---

<div class="post-metadata">

### Author: ![jgomo3](https://clojureverse.org/user_avatar/clojureverse.org/jgomo3/32/1523_2.png) [@jgomo3](https://clojureverse.org/u/jgomo3)
#### Post date: [March 27, 2022, 10:52pm UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/3 "2022-03-27T22:52:07Z")

</div>

As always, much of the confusion while learning is language related.

I have to remember to go to the source: the dictionary.

(In this case, for some reason I was thinking it was something related with the `reify` function and such which link to the idea I was simply missing).

Thank you very much.

---

<div class="post-metadata">

### Author: ![didibus](https://clojureverse.org/user_avatar/clojureverse.org/didibus/32/951_2.png) [@didibus](https://clojureverse.org/u/didibus)
#### Post date: [March 28, 2022, 2:46am UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/4 "2022-03-28T02:46:06Z")

</div>

A good way to think of `reified` is that it means that the program is aware of its programming and can change it, or you might say it is aware of itself and has the ability to modify itself.

To map it to the dictionary definition, you would think of source code for example as the abstraction, and the running program of that compiled source as the concrete representation of it. If the program can access its source code, and can generate more running program from it, such as how you can in Clojure call source on a function, get the source back, and then you can call eval on that source to get back a new running concrete version of that source, then the program source is reifiable, and reifying a function would be the act of taking its source (the abstraction) at runtime and evaluating it again at runtime into a new concretion.

Similarly, a spec is an abstraction, and a concrete value that is valid to the spec would be its concrete realization.

Similarly a type is an abstraction, and a concrete value of that type in memory is its concrete realization.

Similarly an interface or a protocol is an abstraction, and an object or map implementing that interface or protocol is its concrete realization.

Whenever the abstraction for some thing still exists, and can be used to generate more concrete realization of itself, or regenerate/replace existing concrete realization of itself with new ones, we say that the thing can be reified.

That’s why the `reify` function is called `reify`, because it can take an abstraction such as an interface or protocol, and generate a new concrete implementation of it.

Two things are needed for something to be reifiable, you need the abstraction to be available, and you need the ability to generate new concretions from it, and optionally replace existing concretions with new ones.

So let’s say you had a regex matcher, and if at runtime you still have the abstraction for it, it means you’d still have access to the regex string for it. And if you could generate more matchers from that regex string, or modify the regex string and generate more matchers from it, you could say that your regex is reifiable. On the other hand, if you no longer have access to the regex string that was used to compile the matcher, or if you have access to it, but cannot use it to create more matchers from it, then your regex would not be reifiable.

---

<div class="post-metadata">

### Author: ![plexus](https://clojureverse.org/user_avatar/clojureverse.org/plexus/32/6_2.png) [@plexus](https://clojureverse.org/u/plexus)
#### Post date: [March 28, 2022, 8:32am UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/5 "2022-03-28T08:32:51Z")

</div>

I blogged about this a few years back: [Advent 2019 part 1, Clojure Vocab: to Reify](https://lambdaisland.com/blog/2019-12-01-advent-of-parens-1-clojure-vocab-reify)

---

<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 26, 2022, 8:32pm UTC](https://clojureverse.org/t/what-do-people-mean-with-reified/8765/6 "2022-09-26T20:32:53Z")

</div>

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