# How to exactly lock the type of the arguments of a function?

**URL:** <https://discourse.julialang.org/t/how-to-exactly-lock-the-type-of-the-arguments-of-a-function/66325>\
**Category:** General Usage\
**Created:** [August 13, 2021, 6:25am UTC](https://discourse.julialang.org/t/how-to-exactly-lock-the-type-of-the-arguments-of-a-function/66325 "2021-08-13T06:25:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [August 13, 2021, 6:36am UTC](https://discourse.julialang.org/t/how-to-exactly-lock-the-type-of-the-arguments-of-a-function/66325/2 "2021-08-13T06:36:34Z")

</div>

Type assertions in function arguments _only restrict dispatch_. They are not like a type assertion inside of a function or for a global variable.

You’ve asked a similar question (with a related [answer from me](https://discourse.julialang.org/t/do-i-need-to-specify-concrete-type-of-a-variable-such-as-int64-or-just-int-float64-or-just-float/66047/5) and [@Vasily\_Pisarev](https://discourse.julialang.org/t/do-i-need-to-specify-concrete-type-of-a-variable-such-as-int64-or-just-int-float64-or-just-float/66047/8), as well as a link to an answer by [Stefan Karpinski on Stackoverflow on the difference between struct fields and dispatch](https://stackoverflow.com/questions/44435745/julia-abstract-and-concrete-types-integer-versus-int8-versus-int64)) a few days ago, was it not clear enough? Have you read through the manual? If you haven’t, I really recommend doing so - it may seem long & daunting, but I think it will clear up a lot of confusion you seem to have about how julia works. It’s best to acknowledge that Julia is _not_ Fortran but rather its own thing.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-exactly-lock-the-type-of-the-arguments-of-a-function/66325)._
