# '\_' as an argument in function definition

**URL:** <https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708>\
**Category:** General Usage\
**Tags:** question\
**Created:** [December 16, 2023, 1:07pm UTC](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708 "2023-12-16T13:07:47Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [December 17, 2023, 8:24am UTC](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708/7 "2023-12-17T08:24:40Z")

</div>

Let’s be a bit more precise here. The statement I’m questioning is this:

> [@lrnv](#):
>
> it is a bit more powerful than just saying you won’t use it: you _cannot_ use this variable, so the compiler can take this fact into account and optimize accordingly.

This suggests - at least to me - that, compared to a regular (unused) function argument, `_` is somehow special in that it gives extra “you _cannot_ use it” guarantees to the compiler. And if this is what is meant here, I tend to disagree and would like to see an example showing this different optimization potential. To be clear, I would claim that the optimization for `_` (_cannot_ be used) and a regular unused function argument (_won’t_ be used) is just the same.

I don’t see how the thread you’ve linked gives any more insights into this comparison. The only “new” thing it points out is that you can’t use `_` in conjuction with keyword arguments (which is clearly a difference to a regular argument). However, this is a [bug](https://discourse.julialang.org/t/usage-rules-for-bare-underscores/28858/12) and also doesn’t say anything about optimization potential.

But perhaps I’m just misunderstanding the statement in the first place?

---

_[View the full topic](https://discourse.julialang.org/t/as-an-argument-in-function-definition/107708)._
