# ‘3D syntax’ explanation

**URL:** https://racket.discourse.group/t/3d-syntax-explanation/3995
**Category:** General
**Tags:** macro, glossary
**Created:** [November 4, 2025, 8:58am UTC](https://racket.discourse.group/t/3d-syntax-explanation/3995 "2025-11-04T08:58:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spdegabrielle](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/spdegabrielle/32/95_2.png) [@spdegabrielle](https://racket.discourse.group/u/spdegabrielle)
#### Post date: [November 4, 2025, 8:58am UTC](https://racket.discourse.group/t/3d-syntax-explanation/3995/1 "2025-11-04T08:58:05Z")

</div>

Hi

 ![my-list](https://global.discourse-cdn.com/free1/uploads/racket/original/2X/5/56c74f6613a4c2ae5904e64110f5dbb3dbca556a.jpeg)

‘3D syntax’ came up in the discord recently and Jade Sailor kindly provided an [explanation](https://discord.com/channels/571040468092321801/618895179343986688/1435029283121664070) and example:

> 3d syntax is when a syntax object is programmatically constructed to contain something which doesn't have a source representation

`!rkt eval`

```scheme
(parameterize ([current-namespace (make-base-namespace)])
  (print
   (expand
    #'(let-syntax ([f (lambda (stx) #`(quote #,(lambda () 4)))])
        (f)))))

```

`r16 APP`

```scheme
#<syntax:trick:4:6 (let-values () (let-values () (quote #<procedure>)))>

```

> The fully expanded version of the program contains a live procedure, not just numbers and lists and identifiers and such. There are occasionally places where something like this is useful, although there are a number of subtle things to be aware of.

> (Most notably that the code can't be compiled and stored in a `.zo` file and that you can create macros which have weird side effects and generally behave in unexpected ways.)

Also seen at

- [1.4&nbsp;Specifying Syntax with Syntax Classes](https://docs.racket-lang.org/syntax/stxparse-specifying.html#%28tech._3d._syntax%29)

- [https://stackoverflow.com/questions/17437037/what-is-3d-syntax](https://stackoverflow.com/questions/17437037/what-is-3d-syntax)

- [Racket: [racket-dev] [racket] When does 3D syntax get marshalled?](https://lists.racket-lang.org/dev/archive/2013-January/011637.html)

Perhaps one for the [Racket Glossary](https://docs.racket-lang.org/racket-glossary/index.html) @sschwarzer ?

Kind Regards,  
Stephen :beetle:

Credit to @jagen31 for the image 👏 for adding a bit of fun
