# \[ANN\] CompositeStructs.jl

**URL:** <https://discourse.julialang.org/t/ann-compositestructs-jl/58902>\
**Category:** Package Announcements\
**Created:** [April 9, 2021, 4:57am UTC](https://discourse.julialang.org/t/ann-compositestructs-jl/58902 "2021-04-09T04:57:08Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![marius311](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/marius311/32/3953_2.png) [@marius311](https://discourse.julialang.org/u/marius311)\
**Post date:** [April 9, 2021, 6:34am UTC](https://discourse.julialang.org/t/ann-compositestructs-jl/58902/4 "2021-04-09T06:34:05Z")

</div>

> [@jzr](#):
>
> What is the use case you have in mind where you’d rather do `Bar(x,y,z)` than [keep the interfaces distinct with composition](https://www.youtube.com/watch?v=3MNVP9-hglc) `Bar(Foo(x,y),z)` ?

I think its probably a pretty similar use case, just a slightly different way to go about it. Sometimes to me the lines get pretty blurry between “does Bar _have_ a Foo or is Bar a modified _kind of_ Foo” and this package is if you’re leaning the latter. For the former, if you do want Bar to behave like a Foo in some scenarios, you will probably still need something like “delegation” (I found [this thread](https://discourse.julialang.org/t/method-forwarding-macro/23355) informative) so in some sense this package takes the place of those if you choose to go this route.

---

_[View the full topic](https://discourse.julialang.org/t/ann-compositestructs-jl/58902)._
