# Mutable struct vs closure

**URL:** <https://discourse.julialang.org/t/mutable-struct-vs-closure/20233>\
**Category:** New to Julia\
**Tags:** struct, closure\
**Created:** [January 29, 2019, 2:17pm UTC](https://discourse.julialang.org/t/mutable-struct-vs-closure/20233 "2019-01-29T14:17:03Z")\
**Posts on this page:** 1\
**Showing post:** 60

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [January 31, 2019, 5:46pm UTC](https://discourse.julialang.org/t/mutable-struct-vs-closure/20233/60 "2019-01-31T17:46:35Z")

</div>

Don’t use `@pure`. It doesn’t mean what you think it means and Julia can often perform the optimizations you want with inlining alone.

---

_[View the full topic](https://discourse.julialang.org/t/mutable-struct-vs-closure/20233)._
