# Convert() vs constructors

**URL:** <https://discourse.julialang.org/t/convert-vs-constructors/4159>\
**Category:** General Usage\
**Tags:** convert, constructors\
**Created:** [June 8, 2017, 2:26am UTC](https://discourse.julialang.org/t/convert-vs-constructors/4159 "2017-06-08T02:26:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [June 8, 2017, 2:47am UTC](https://discourse.julialang.org/t/convert-vs-constructors/4159/2 "2017-06-08T02:47:01Z")

</div>

`convert` happens automatically on assignment so don’t define a `convert` that will cause surprise if it gets called. Constructors are always explicit.  
`promote_type` has no direct relation with convertion (i.e. defining it does not affect convertions at all). It’s result is expected to be used to call `convert` on by the caller, this includes lots of arithmetic functions.

---

_[View the full topic](https://discourse.julialang.org/t/convert-vs-constructors/4159)._
