# Compiling AST's

**URL:** <https://discourse.julialang.org/t/compiling-asts/86834>\
**Category:** Internals & Design\
**Created:** [September 6, 2022, 11:41am UTC](https://discourse.julialang.org/t/compiling-asts/86834 "2022-09-06T11:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![atteson](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@atteson](https://discourse.julialang.org/u/atteson)\
**Post date:** [September 6, 2022, 11:41am UTC](https://discourse.julialang.org/t/compiling-asts/86834/1 "2022-09-06T11:41:46Z")

</div>

I not infrequently find myself building up AST’s representing a function definition and wishing to compile them. I end up using eval which seems a bit too non-specific for this purpose. I think it would be useful to have a function which took and AST and compile it.

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [September 6, 2022, 11:47am UTC](https://discourse.julialang.org/t/compiling-asts/86834/2 "2022-09-06T11:47:33Z")

</div>

what would the difference be between this function and eval?
