# With struct do

**URL:** <https://discourse.julialang.org/t/with-struct-do/41341>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 13, 2020, 9:22pm UTC](https://discourse.julialang.org/t/with-struct-do/41341 "2020-06-13T21:22:19Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [June 14, 2020, 5:20am UTC](https://discourse.julialang.org/t/with-struct-do/41341/8 "2020-06-14T05:20:13Z")

</div>

I came up with something here: [Unpack named tuples (does anyone know how to do it?) - #13 by Mason](https://discourse.julialang.org/t/unpack-named-tuples-does-anyone-know-how-to-do-it/32456/13) but I don’t think there’s any good way to turn a `setfield!` statement like the one you show: `field3 = field1 + field2 ` into `x.field3 = x.field1 + x.field2` so I posted it in the other thread rather than this one.

---

_[View the full topic](https://discourse.julialang.org/t/with-struct-do/41341)._
