# Using \`indirect\` modifier for \`struct\` properties

**URL:** <https://forums.swift.org/t/using-indirect-modifier-for-struct-properties/37600>\
**Category:** Pitches\
**Created:** [June 15, 2020, 4:11pm UTC](https://forums.swift.org/t/using-indirect-modifier-for-struct-properties/37600 "2020-06-15T16:11:30Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![Josh\_Osborne](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/josh_osborne/32/833_2.png) [@Josh\_Osborne](https://forums.swift.org/u/Josh_Osborne)\
**Post date:** [June 18, 2020, 9:18pm UTC](https://forums.swift.org/t/using-indirect-modifier-for-struct-properties/37600/31 "2020-06-18T21:18:23Z")

</div>

> [@viktorcode](#):
>
> What I don't like in `struct` serving as a tree or a list node is that it always has to have `value` property, regardless if you want it on every node or just on leaves.

Sure, but for the sake of argument lets say the value in my tree applies to all areas not covered by a specific child node. I have never used that in a 3D tree, but I have in a 2D tree.

That brings us back to a plausible struct that is forced to use an enum to get the indirect feature. It really isn't the end of the world, if the error message directed one to one of the existing solutions I would say this is more like a paper cut.

---

_[View the full topic](https://forums.swift.org/t/using-indirect-modifier-for-struct-properties/37600)._
