# On arrays with inline elements (vs pointer indirection)

**URL:** https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211
**Category:** General Usage
**Created:** [October 4, 2022, 7:02am UTC](https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211 "2022-10-04T07:02:15Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)
#### Post date: [October 4, 2022, 7:25am UTC](https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211/4 "2022-10-04T07:25:34Z")

</div>

> [@Immutables with reference-fields: Why boxed?](https://discourse.julialang.org/t/immutables-with-reference-fields-why-boxed/7706):
>
> One of the most painful things in julia is that there is no zero-cost abstraction for bundling gc-visible references with anything. This manifests in allocating views, allocating Tuple{Vector{Int}, Int}, etc. More than just making some code slow, this severely constrains APIs and design of data layouts. A priori there is no reason at all that immutable types cannot be always inline (self-referential / circular immutables make no sense and don’t even work in C); TBH, I see no point in immutabili…

> **[GitHub - tkf/Restacker.jl: Put immutables back in the stack](https://github.com/tkf/Restacker.jl)**
>
> Put immutables back in the stack. Contribute to tkf/Restacker.jl development by creating an account on GitHub.

---

_[View the full topic](https://discourse.julialang.org/t/on-arrays-with-inline-elements-vs-pointer-indirection/88211)._
