# Composition and inheritance: the Julian way

**URL:** <https://discourse.julialang.org/t/composition-and-inheritance-the-julian-way/11231>\
**Category:** General Usage\
**Tags:** inheritance, structtypes\
**Created:** [May 29, 2018, 1:06pm UTC](https://discourse.julialang.org/t/composition-and-inheritance-the-julian-way/11231 "2018-05-29T13:06:00Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![gcalderone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gcalderone/32/1539_2.png) [@gcalderone](https://discourse.julialang.org/u/gcalderone)\
**Post date:** [May 31, 2018, 2:39pm UTC](https://discourse.julialang.org/t/composition-and-inheritance-the-julian-way/11231/27 "2018-05-31T14:39:36Z")

</div>

> [@ScottPJones](#):
>
> I’m struggling to understand that it’s somehow impossible to customize the behavior of an objects.

well, you know where all this discussion [comes from](https://discourse.julialang.org/t/how-to-add-metadata-info-to-a-dataframe/11168/) 😉. Extending the behavior of, say, a `DataFrame` object is not trivial at all…

It would be nice if you could provide an example which solves the Person/Citizen problem in the first post using traits. Please 🙏 avoid encapsulation since on a real example (e.g. a `DataFrame`) this means re-defining hundreds of methods…

---

_[View the full topic](https://discourse.julialang.org/t/composition-and-inheritance-the-julian-way/11231)._
