# How to declare N nested Vectors?

**URL:** <https://discourse.julialang.org/t/how-to-declare-n-nested-vectors/110813>\
**Category:** General Usage\
**Tags:** arrays, vector-of-vectors\
**Created:** [February 27, 2024, 12:14am UTC](https://discourse.julialang.org/t/how-to-declare-n-nested-vectors/110813 "2024-02-27T00:14:03Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![mnemnion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mnemnion/32/206596_2.png) [@mnemnion](https://discourse.julialang.org/u/mnemnion)\
**Post date:** [February 27, 2024, 8:14pm UTC](https://discourse.julialang.org/t/how-to-declare-n-nested-vectors/110813/16 "2024-02-27T20:14:47Z")

</div>

> [@BioTurboNick](#):
>
> At least printing starts to break at 491 dimensions in 1.10

The printing issue also occurs for [deeply recursive types](https://discourse.julialang.org/t/julia-never-stops-compiling-for-new-recursive-vector-types/110232/19), as I discovered recently.

Deeply nested containers kind of have to overflow the stack, because it’s too late to add a depth counter to `show`, which at least the internal implementations could have used.

But type printing is internal\*, and could use a stack with a loop to avoid this. Might be a good first issue, since the fix would be fairly self-contained.

[\*] this isn’t 100% true, since it’s possible to overload `show(::IO, ::Type{MyType})`, however bad an idea that might be. But handling it for the builtin types would flatten the stack enough to avoid a blowup in many more cases.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-declare-n-nested-vectors/110813)._
