# How bad is type piracy actually?

**URL:** https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913
**Category:** General Usage
**Tags:** type-piracy
**Created:** [April 20, 2020, 5:22pm UTC](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913 "2020-04-20T17:22:34Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![jeff.bezanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff.bezanson/32/48_2.png) [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)
#### Post date: [April 20, 2020, 8:54pm UTC](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913/6 "2020-04-20T20:54:26Z")

</div>

Right, type piracy is defining `function f(x::T)` where you “own” neither `f` nor `T`. If `f` is your own function, or `T` is a type you defined, there’s no issue at all. But even if neither is true, it still might be OK. It’s just a smell that something bad might be happening, such as:

- The author/designer of `f` really did not want it to support type `T`, so you’re misunderstanding what the function is supposed to mean.
- The code is in the wrong place, and should be moved to where `f` or `T` is defined.

But if everything seems to be in order, pirate away.

---

_[View the full topic](https://discourse.julialang.org/t/how-bad-is-type-piracy-actually/37913)._
