# What do we call the type specific versions of methods?

**URL:** <https://discourse.julialang.org/t/what-do-we-call-the-type-specific-versions-of-methods/87848>\
**Category:** Internals & Design\
**Created:** [September 27, 2022, 12:43am UTC](https://discourse.julialang.org/t/what-do-we-call-the-type-specific-versions-of-methods/87848 "2022-09-27T00:43:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Ellison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_ellison/32/5749_2.png) [@Alex\_Ellison](https://discourse.julialang.org/u/Alex_Ellison)\
**Post date:** [September 27, 2022, 12:43am UTC](https://discourse.julialang.org/t/what-do-we-call-the-type-specific-versions-of-methods/87848/1 "2022-09-27T00:43:32Z")

</div>

Hey, semantics question. If I write a method with a parametric type, it can (always?) results in distinct llvm code depending on the argument type(s) going in. There is still one method, but two _somethings_. Do we have a technical term for that something? I didn’t find a clear answer in documentation. Thanks

Eg - `julia_f_149` and `julia_f_167` have different names and one is appropriately `return 1`, the other `return 2`.

```julia
julia> function f(v::Val{S}) where S
           if S
               return 1
           else
               return 2
           end
       end

julia> @code_llvm f(Val(true))
; @ REPL[3]:1 within `f`
; Function Attrs: uwtable
define i64 @julia_f_149() #0 {
top:
; @ REPL[3]:3 within `f`
  ret i64 1
}

julia> @code_llvm f(Val(false))
; @ REPL[3]:1 within `f`
; Function Attrs: uwtable
define i64 @julia_f_167() #0 {
top:
; @ REPL[3]:5 within `f`
  ret i64 2
}

julia> methods(f)
# 1 method for generic function "f":
[1] f(v::Val{S}) where S in Main at REPL[3]:1

```

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [September 27, 2022, 12:45am UTC](https://discourse.julialang.org/t/what-do-we-call-the-type-specific-versions-of-methods/87848/2 "2022-09-27T00:45:33Z")

</div>

These are called method instances (which is the result of a method with given arg types).

---

<div class="post-metadata">

**Author:** ![Alex\_Ellison](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex_ellison/32/5749_2.png) [@Alex\_Ellison](https://discourse.julialang.org/u/Alex_Ellison)\
**Post date:** [September 27, 2022, 12:56am UTC](https://discourse.julialang.org/t/what-do-we-call-the-type-specific-versions-of-methods/87848/3 "2022-09-27T00:56:33Z")

</div>

cheers
