# Is it possible to create a struct instance without an explicit constructor?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-create-a-struct-instance-without-an-explicit-constructor/64243>\
**Category:** General Usage\
**Created:** [July 7, 2021, 11:22pm UTC](https://discourse.julialang.org/t/is-it-possible-to-create-a-struct-instance-without-an-explicit-constructor/64243 "2021-07-07T23:22:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [July 7, 2021, 11:47pm UTC](https://discourse.julialang.org/t/is-it-possible-to-create-a-struct-instance-without-an-explicit-constructor/64243/2 "2021-07-07T23:47:13Z")

</div>

If you use the `Base.@kwdef` you can use keywords to intialize the values. That in combination with `keys()`, `values()`, `fieldnames()`, can give you the tools to build complicated constructors.

(If your structure is mutable maybe just using @kwdef solves all your problems)

---

_[View the full topic](https://discourse.julialang.org/t/is-it-possible-to-create-a-struct-instance-without-an-explicit-constructor/64243)._
