# Runtime-calculated default values for structs

**URL:** <https://forum.elixirforum.com/t/runtime-calculated-default-values-for-structs/73189>\
**Category:** Proposals: Ideas\
**Tags:** ecto, structs, oban, default\
**Created:** [November 4, 2025, 3:57pm UTC](https://forum.elixirforum.com/t/runtime-calculated-default-values-for-structs/73189 "2025-11-04T15:57:26Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mudasobwa](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/mudasobwa/32/41119_2.png) [@mudasobwa](https://forum.elixirforum.com/u/mudasobwa)\
**Post date:** [November 4, 2025, 5:30pm UTC](https://forum.elixirforum.com/t/runtime-calculated-default-values-for-structs/73189/6 "2025-11-04T17:30:56Z")

</div>

> [@ffloyd](#):
>
> Documentation of the lib is extremely outdated

Huh?

> [@ffloyd](#):
>
> examples simply do not compile

I have created an example by copy-pasting the code from the page I linked. [estructura/examples/with\_formulae/test/with\_formulae\_test.exs at master · am-kantox/estructura · GitHub](https://github.com/am-kantox/estructura/blob/master/examples/with_formulae/test/with_formulae_test.exs)

> [@ffloyd](#):
>
> generates a new field value each time `%MyStruct{}` or `struct!(MyStruct)` is called

I have been developing enough code to strictly avoid messing with the standard syntax. `Estructura` is designed to rely on `Access` only, as you can see in the example I linked above.

---

_[View the full topic](https://forum.elixirforum.com/t/runtime-calculated-default-values-for-structs/73189)._
