# How to simplify the code in constructing struct

**URL:** <https://discourse.julialang.org/t/how-to-simplify-the-code-in-constructing-struct/70411>\
**Category:** New to Julia\
**Tags:** inheritance, struct\
**Created:** [October 26, 2021, 3:07pm UTC](https://discourse.julialang.org/t/how-to-simplify-the-code-in-constructing-struct/70411 "2021-10-26T15:07:39Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)\
**Post date:** [October 26, 2021, 3:34pm UTC](https://discourse.julialang.org/t/how-to-simplify-the-code-in-constructing-struct/70411/4 "2021-10-26T15:34:32Z")

</div>

See [this](https://discourse.julialang.org/t/generate-a-mutable-struct-which-inherits-others/47347/5) thread for related discussion. If you’re worried about the visual noise that results from accessing deeply nested fields, you may appreciate [UnPack.jl](https://github.com/mauro3/UnPack.jl).

---

_[View the full topic](https://discourse.julialang.org/t/how-to-simplify-the-code-in-constructing-struct/70411)._
