# GC problems surfaced... there is a reason Julia can't have void references. How do I make a type-stable entity update system?

**URL:** <https://discourse.julialang.org/t/gc-problems-surfaced-there-is-a-reason-julia-cant-have-void-references-how-do-i-make-a-type-stable-entity-update-system/118971>\
**Category:** General Usage\
**Created:** [September 3, 2024, 6:01am UTC](https://discourse.julialang.org/t/gc-problems-surfaced-there-is-a-reason-julia-cant-have-void-references-how-do-i-make-a-type-stable-entity-update-system/118971 "2024-09-03T06:01:25Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Post date:** [September 3, 2024, 8:15am UTC](https://discourse.julialang.org/t/gc-problems-surfaced-there-is-a-reason-julia-cant-have-void-references-how-do-i-make-a-type-stable-entity-update-system/118971/12 "2024-09-03T08:15:33Z")

</div>

Well, the reason is that… well, I’m thinking of making an ECS… it’s a data structure supporting its own programming paradigm.

Here is an example ECS implementation in C.

> **[GitHub - SanderMertens/flecs: A fast entity component system (ECS) for C & C++](https://github.com/SanderMertens/flecs)**
>
> A fast entity component system (ECS) for C & C++

Here is where it started.

> [@Anyone interested in coding a Julia ECS?](https://discourse.julialang.org/t/anyone-interested-in-coding-a-julia-ecs/116587/10):
>
> I had a brief look and IIUC then flecs uses these archetypes as an organizational tool for the data essentially. I does not compile specific versions of functions for every archetype. The linked blog [about the archetypes](https://ajmmertens.medium.com/building-an-ecs-2-archetypes-and-vectorization-fe21690805f9) explicitly mentions type erasure to make things more uniform. I think that your plan of specializing on every archetype is bound for failure. The main reason being the huge overhead of actually compiling methods (because the compiler is slow). So you’d never want to compile ne…

---

_[View the full topic](https://discourse.julialang.org/t/gc-problems-surfaced-there-is-a-reason-julia-cant-have-void-references-how-do-i-make-a-type-stable-entity-update-system/118971)._
