# One Kind of Binding?

**URL:** <https://racket.discourse.group/t/one-kind-of-binding/3414>\
**Category:** General\
**Tags:** macro\
**Created:** [December 14, 2024, 11:10am UTC](https://racket.discourse.group/t/one-kind-of-binding/3414 "2024-12-14T11:10:40Z")\
**Posts on this page:** 1\
**Showing post:** 30

<div class="post-metadata">

**Author:** ![acarrico](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/acarrico/32/2135_2.png) [@acarrico](https://racket.discourse.group/u/acarrico)\
**Post date:** [February 7, 2025, 1:55pm UTC](https://racket.discourse.group/t/one-kind-of-binding/3414/30 "2025-02-07T13:55:37Z")

</div>

For the record, I must admit that even though I recently read this thread, including @samth's remarks, I _still_ fell into the trap of thinking that a struct's name would be bound to its descriptor at phase 1 rather than being a transformer binding in this parallel thread:

> [@Defining the runtime value of a struct name](https://racket.discourse.group/t/defining-the-runtime-value-of-a-struct-name/3543/1):
>
> By default, the Racket struct macro creates two bindings for the name: a runtime binding, and a transformer binding. You can shift these around with #:name and #:constructor-name, but as far as I know, you can't supply the runtime name binding while keeping the transformer binding. Here are some examples using a macro that simulates the ability to do this "correctly" (in my opinion of course): racket\> (struct\* these (fields) #:name-expr (lambda args (these-constructor args))) racket\> (these 1 …

"Obviously" a phase 1 binding wouldn't work since the name would not show up in the `match` form, etc. The worse part is that I was even using the correct language ("transformer binding") while making this mental mistake. My remarks don't even make sense because it wouldn't be possible to create both a phase 0 binding and a transformer binding for the same identifier. It is no wonder that @samth needed me to clarify.

In this example, the fact that the transformer binding's value acts as both a procedure and a structure may create a garden path to the notion that there must be two bindings, leading to the notion that they must be at different phase levels. Either that or I just need an object lesson every time I step back into the world of macro practice after an extended period of time.

---

_[View the full topic](https://racket.discourse.group/t/one-kind-of-binding/3414)._
