# Any reason to prefer \`::Type{T}\` over \`T::Type\`?

**URL:** <https://discourse.julialang.org/t/any-reason-to-prefer-type-t-over-t-type/103400>\
**Category:** General Usage\
**Tags:** parametric-types, style\
**Created:** [August 31, 2023, 11:18am UTC](https://discourse.julialang.org/t/any-reason-to-prefer-type-t-over-t-type/103400 "2023-08-31T11:18:41Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![albheim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albheim/32/34660_2.png) [@albheim](https://discourse.julialang.org/u/albheim)\
**Post date:** [September 1, 2023, 5:45am UTC](https://discourse.julialang.org/t/any-reason-to-prefer-type-t-over-t-type/103400/4 "2023-09-01T05:45:35Z")

</div>

I think the main difference is just that you have access to `T` in the function body, asked about a similar case a whole ago.

> [@Parametric type signature in methods, any actual difference?](https://discourse.julialang.org/t/parametric-type-signature-in-methods-any-actual-difference/67663):
>
> Was just curious if there was actually a difference in some way between these two ways of defining a method with parametric types. function f1(x::Vector{\<:Real}) # Stuff end function f2(x::Vector{T}) where T \<: Real # Stuff end Gave a quick try where i set # Stuff to be first(x) and looked at @code\_native which seemed exactly the same, but maybe that was just so simple so it turned out the same?

---

_[View the full topic](https://discourse.julialang.org/t/any-reason-to-prefer-type-t-over-t-type/103400)._
