# Why use subtypes instead of traits and duck typing?

**URL:** https://discourse.julialang.org/t/why-use-subtypes-instead-of-traits-and-duck-typing/59146
**Category:** General Usage
**Tags:** inheritance, traits
**Created:** [April 13, 2021, 4:51am UTC](https://discourse.julialang.org/t/why-use-subtypes-instead-of-traits-and-duck-typing/59146 "2021-04-13T04:51:33Z")
**Posts on this page:** 1
**Showing post:** 27

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [April 14, 2021, 6:18pm UTC](https://discourse.julialang.org/t/why-use-subtypes-instead-of-traits-and-duck-typing/59146/27 "2021-04-14T18:18:56Z")

</div>

> [@jakobnissen](#):
>
> Even if we _could_ get static analysis, would we really want a system that is hard to use without analysis?

For me the answer is definitely yes. We have powerful analytical tools, starting with [JET.jl](https://discourse.julialang.org/t/ann-jet-jl-the-next-generation-of-code-checker-for-julia/58913), and likely more in the future. I can do a lot more with tools than I can without them, and I want to take advantage of that, not restrict myself to the least common denominator.

---

_[View the full topic](https://discourse.julialang.org/t/why-use-subtypes-instead-of-traits-and-duck-typing/59146)._
