# Best practice for argument type declarations?

**URL:** <https://discourse.julialang.org/t/best-practice-for-argument-type-declarations/80194>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 28, 2022, 9:29am UTC](https://discourse.julialang.org/t/best-practice-for-argument-type-declarations/80194 "2022-04-28T09:29:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnldlg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnldlg/32/209465_2.png) [@dnldlg](https://discourse.julialang.org/u/dnldlg)\
**Post date:** [April 28, 2022, 9:29am UTC](https://discourse.julialang.org/t/best-practice-for-argument-type-declarations/80194/1 "2022-04-28T09:29:08Z")

</div>

Hi all, I started learning Julia a few days ago and was wondering what the recommended coding practice is with regard to argument type declarations. I witnessed some people on stackoverflow saying it is “nonesense” to explicitly specify them as there is no benefit from it (I guess this person was talking about performance gains as type stability is a benefit from it, right?)

What is your opinion about this?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 28, 2022, 9:33am UTC](https://discourse.julialang.org/t/best-practice-for-argument-type-declarations/80194/2 "2022-04-28T09:33:31Z")

</div>

> [@Annotating Types: Best practice for beginners](https://discourse.julialang.org/t/annotating-types-best-practice-for-beginners/50521):
>
> As a beginner I’m slightly unsure of when I should be annotating my code with types. I’ve read the section on types in the Julia manual and I’m happy with the basics (type hierarchy, parametric types, avoiding abstract types, and the importance of type stability) but I’m still slightly unsure how I should using type annotations in practice. For instance, from the QuantEcon website: You will notice that in the lecture notes we have never directly declared any types. This is intentional both fo…
