# Are hasmethod and applicable recommended for defining traits now?

**URL:** <https://discourse.julialang.org/t/are-hasmethod-and-applicable-recommended-for-defining-traits-now/97533>\
**Category:** General Usage\
**Tags:** question, traits\
**Created:** [April 16, 2023, 3:21am UTC](https://discourse.julialang.org/t/are-hasmethod-and-applicable-recommended-for-defining-traits-now/97533 "2023-04-16T03:21:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zsunberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zsunberg/32/1883_2.png) [@zsunberg](https://discourse.julialang.org/u/zsunberg)\
**Post date:** [April 16, 2023, 3:21am UTC](https://discourse.julialang.org/t/are-hasmethod-and-applicable-recommended-for-defining-traits-now/97533/1 "2023-04-16T03:21:10Z")

</div>

If I understand correctly, as of Julia 1.10, according to [this PR](https://github.com/JuliaLang/julia/pull/48639), it will be possible to statically infer the output of `hasmethod` and `applicable`. Previously, things like `static_hasmethod` from Tricks.jl seemed to be not recommended. Has that changed? Are `hasmethod` and `applicable` recommended now? Can I start thinking about using `hasmethod` to define traits or use it like a trait itself?

@jameson it would be especially helpful to hear any thoughts you have about this.

---

<div class="post-metadata">

**Author:** ![jameson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jameson/32/23_2.png) [@jameson](https://discourse.julialang.org/u/jameson)\
**Post date:** [April 16, 2023, 12:41pm UTC](https://discourse.julialang.org/t/are-hasmethod-and-applicable-recommended-for-defining-traits-now/97533/2 "2023-04-16T12:41:59Z")

</div>

I have no helpful recommendations here. I simply was the implementer of that PR.

---

<div class="post-metadata">

**Author:** ![zsunberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zsunberg/32/1883_2.png) [@zsunberg](https://discourse.julialang.org/u/zsunberg)\
**Post date:** [April 17, 2023, 12:21am UTC](https://discourse.julialang.org/t/are-hasmethod-and-applicable-recommended-for-defining-traits-now/97533/3 "2023-04-17T00:21:58Z")

</div>

Ok, thanks for responding. I interpret that to mean you don’t foresee any especially bad implications for compiler performance due to using `hasmethod`.
