# Preferred syntax for parametric type aliases in 0.6

**URL:** <https://discourse.julialang.org/t/preferred-syntax-for-parametric-type-aliases-in-0-6/2832>\
**Category:** General Usage\
**Created:** [March 23, 2017, 3:54am UTC](https://discourse.julialang.org/t/preferred-syntax-for-parametric-type-aliases-in-0-6/2832 "2017-03-23T03:54:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssfrr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ssfrr/32/3736_2.png) [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Post date:** [March 23, 2017, 3:54am UTC](https://discourse.julialang.org/t/preferred-syntax-for-parametric-type-aliases-in-0-6/2832/1 "2017-03-23T03:54:09Z")

</div>

When using type aliases to fix some type parameters, is there a difference between:

```julia
const MyVec1{T} = Array{T, 1}
const MyVec2{T} = Array{T, 1} where T
const MyVec3 = Array{T, 1} where T

```

Or if they’re functionally equivalent is one of them preferred? I rather like the `MyVec1` definition as it seems most analogous to `struct Foo{T} ... end` definitions. It also allows you to clearly specify the type parameter order:

```julia
julia> const RevArray1{N, T} = Array{T, N}
Array{T,N} where T where N

julia> const RevArray2{N, T} = Array{T, N} where {T, N}
Array{T,N} where N where T

julia> const RevArray3 = Array{T, N} where {T, N}
Array{T,N} where N where T

julia> const RevArray4 = Array{T, N} where {N, T}
Array{T,N} where T where N

julia> RevArray1{1, Int}
Array{Int64,1}

julia> RevArray2{1, Int}
Array{1,Int64}

julia> RevArray3{1, Int}
Array{1,Int64}

julia> RevArray4{1, Int}
Array{Int64,1}

```

Here `RevArray2` seems problematic because the parameter orderings conflict (apparently the `where` clause wins)

---

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [March 23, 2017, 4:04am UTC](https://discourse.julialang.org/t/preferred-syntax-for-parametric-type-aliases-in-0-6/2832/2 "2017-03-23T04:04:42Z")

</div>

`MyVec1` is the preferred syntax surgar for `MyVec3`. `MyVec2` is wrong.
