# Type alias or newtype wrapper?

**URL:** <https://discourse.julialang.org/t/type-alias-or-newtype-wrapper/46770>\
**Category:** New to Julia\
**Created:** [September 17, 2020, 11:15am UTC](https://discourse.julialang.org/t/type-alias-or-newtype-wrapper/46770 "2020-09-17T11:15:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [September 17, 2020, 12:06pm UTC](https://discourse.julialang.org/t/type-alias-or-newtype-wrapper/46770/3 "2020-09-17T12:06:02Z")

</div>

One thing to think about is whether you want to use `Image` for dispatch. If you really just want to treat image as a regular array, the first option is probably the way to go, but if you wanted to overload `inv` to invert the colors of the image for example, you should definitely go with the second option, because otherwise, you are commiting type piracy.

---

_[View the full topic](https://discourse.julialang.org/t/type-alias-or-newtype-wrapper/46770)._
