# Is Julia's way of OOP superior to C++/Python? Why Julia doesn't use class-based OOP?

**URL:** <https://discourse.julialang.org/t/is-julias-way-of-oop-superior-to-c-python-why-julia-doesnt-use-class-based-oop/52058>\
**Category:** Internals & Design\
**Created:** [December 18, 2020, 4:32pm UTC](https://discourse.julialang.org/t/is-julias-way-of-oop-superior-to-c-python-why-julia-doesnt-use-class-based-oop/52058 "2020-12-18T16:32:10Z")\
**Posts on this page:** 1\
**Showing post:** 100

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [December 25, 2020, 10:47pm UTC](https://discourse.julialang.org/t/is-julias-way-of-oop-superior-to-c-python-why-julia-doesnt-use-class-based-oop/52058/100 "2020-12-25T22:47:33Z")

</div>

> [@cce](#):
>
> There’s a brief window in the early morning after a small piece of chocolate where I think I understand the Holy Trait pattern. However, by afternoon, I’m back to puzzling… I know the problem exists. I’m not even sure I could describe the problem.

I wrote a little about the idea behind traits [here](https://discourse.julialang.org/t/how-to-subtype-a-type-alias/24050/4), not sure if that’s helpful. Maybe [this blogpost](https://invenia.github.io/blog/2019/11/06/julialang-features-part-2/) by @oxinabox is helpful.

The problem with explaining traits is that it’s really hard to find a small self contained example of why they’re useful. For any small snippet, defining a `supertype` is just better. Traits really become useful when you have multiple packages interacting that don’t want to all share a supertype, or in cases where you really want a type to have two supertypes.

---

_[View the full topic](https://discourse.julialang.org/t/is-julias-way-of-oop-superior-to-c-python-why-julia-doesnt-use-class-based-oop/52058)._
