# ComponentArrays vs LabelledArrays

**URL:** <https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464>\
**Category:** General Usage\
**Tags:** componentarrays\
**Created:** [August 31, 2021, 10:51pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464 "2021-08-31T22:51:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amrods](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amrods/32/2543_2.png) [@amrods](https://discourse.julialang.org/u/amrods)\
**Post date:** [August 31, 2021, 10:51pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/1 "2021-08-31T22:51:42Z")

</div>

I’ve been a user of [`ComponentArrays.jl`](https://github.com/jonniedie/ComponentArrays.jl) for a while. Just recently discovered [`LabelledArrays.jl`](https://github.com/SciML/LabelledArrays.jl). They strike as very similar. Are there any fundamental differences between them?

Just as example, this is the kind of use for which I employ `ComponentArrays`:

> [@Parsimonious way to unpack big structs](https://discourse.julialang.org/t/parsimonious-way-to-unpack-big-structs/66522/9):
>
> using your example, it would be using ComponentArrays using UnPack p = ComponentArray(α=0.1, β=0.2, γ=0.3) function f2(x; p=p) @unpack α, β, γ = p return x^(α) + x^(β) + x^(γ) end I also like to organize the parameters inside the ComponentArray, for example: using ComponentArrays using UnPack # full model function model(p; data=data) @unpack p1, p2 = p @unpack data1, data2 = data # component 1 r1 = f1(p1; data=data1) # component 2 r2 = f2(p2; data=data…

Are there any advantages of `LabelledArrays` over `ComponentArrays` in that case?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 1, 2021, 12:19pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/3 "2021-09-01T12:19:51Z")

</div>

ComponentArrays.jl is probably just better at this point.

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 24, 2022, 5:15pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/4 "2022-10-24T17:15:48Z")

</div>

Sorry for the necropost, but would you say that this is still the case?

I found `ComponentArrays.jl` to be a really cool package, but after using it for a couple of days I run into a couple of issues that made me appreciate the subtleties of the package. I am opening PRs to address some of these, but I think it would be great if the two packages were to merge to one, so that we don’t write code and fix bugs twice 😃

What do you think?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 24, 2022, 5:36pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/5 "2022-10-24T17:36:46Z")

</div>

Things are pretty much just going to ComponentArrays.jl at this point. There’s no reason to kill LabelledArrays.jl, it does what it does, but ComponentArrays.jl has a much bigger feature-set so we advocate its use in the docs.

---

<div class="post-metadata">

**Author:** ![nrontsis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nrontsis/32/38535_2.png) [@nrontsis](https://discourse.julialang.org/u/nrontsis)\
**Post date:** [October 26, 2022, 12:33pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/6 "2022-10-26T12:33:14Z")

</div>

> [@ChrisRackauckas](#):
>
> There’s no reason to kill LabelledArrays.jl

Perhaps I am missing context here, but I assume that keeping `LabelledArrays.jl` has a maintenance cost? Over 2022, there were [almost twice as many commits to `LabelledArrays.jl` as compared to `ComponentArrays.jl`](https://github.com/SciML/LabelledArrays.jl/graphs/contributors?from=2022-01-01&to=2022-10-26&type=c).

My point is that if the efforts to maintain `LabelledArrays.jl` were instead channeled to `ComponentArrays.jl` then we could end up with a more robust package.

I am somewhat biased here because I ended up opening 3 issues and 4 PRs after a few days of interacting with `ComponentArrays.jl`.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 26, 2022, 3:41pm UTC](https://discourse.julialang.org/t/componentarrays-vs-labelledarrays/67464/7 "2022-10-26T15:41:38Z")

</div>

> [@nrontsis](#):
>
> Over 2022, there were [almost twice as many commits to `LabelledArrays.jl` as compared to `ComponentArrays.jl`](https://github.com/SciML/LabelledArrays.jl/graphs/contributors?from=2022-01-01&to=2022-10-26&type=c).
> 
> My point is that if the efforts to maintain `LabelledArrays.jl` were instead channeled to `ComponentArrays.jl` then we could end up with a more robust package.

The amount of work into LabelledArrays.jl has been effectively zero. It’s straightforward to maintain and takes no time.
