# Change a struct in place

**URL:** <https://discourse.julialang.org/t/change-a-struct-in-place/63914>\
**Category:** General Usage\
**Tags:** hack\
**Created:** [July 1, 2021, 7:42pm UTC](https://discourse.julialang.org/t/change-a-struct-in-place/63914 "2021-07-01T19:42:09Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![doit](https://avatars.discourse-cdn.com/v4/letter/d/9dc877/32.png) [@doit](https://discourse.julialang.org/u/doit)\
**Post date:** [July 2, 2021, 11:16am UTC](https://discourse.julialang.org/t/change-a-struct-in-place/63914/21 "2021-07-02T11:16:36Z")

</div>

> [@lmiq](#):
>
> Sure, but in that case you cannot change the type of an instance of the object to another type.

I didn’t even think of that as a solution to the problem because I actively try to avoid defining field types that way. You are absolutely correct.

[Previous page](https://discourse.julialang.org/t/change-a-struct-in-place/63914.md?page=1)
