# Why Matrix{Float64}() is deprecated but Vector{Float64}() isn't?

**URL:** https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923
**Category:** General Usage
**Tags:** question
**Created:** [September 16, 2017, 5:58pm UTC](https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923 "2017-09-16T17:58:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [September 16, 2017, 5:58pm UTC](https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923/1 "2017-09-16T17:58:28Z")

</div>

`Matrix{Float64}()` generates a deprecation warning in Julia 0.6.0:

> WARNING: Matrix{T}() is deprecated, use Matrix{T}(0, 0) instead.

But `Vector{Float64}()` works fine. Why one is deprecated but the other isn’t? What is the difference?

---

<div class="post-metadata">

### Author: ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)
#### Post date: [September 16, 2017, 8:53pm UTC](https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923/2 "2017-09-16T20:53:52Z")

</div>

It was discussed here: [https://github.com/JuliaLang/julia/pull/20330#pullrequestreview-19245131](https://github.com/JuliaLang/julia/pull/20330#pullrequestreview-19245131)

I think the consensus was that it would be consistent to deprecate `Vector{T}()` too, but that syntax is widely used so it would be very disruptive.

---

<div class="post-metadata">

### Author: ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)
#### Post date: [September 16, 2017, 11:24pm UTC](https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923/3 "2017-09-16T23:24:03Z")

</div>

Shouldn’t it be deprecated now for consistency in Julia v0.7 and beyond?

---

<div class="post-metadata">

### Author: ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)
#### Post date: [September 17, 2017, 6:36am UTC](https://discourse.julialang.org/t/why-matrix-float64-is-deprecated-but-vector-float64-isnt/5923/4 "2017-09-17T06:36:40Z")

</div>

Although the PR did not get much attention, see [https://github.com/JuliaLang/julia/pull/22717](https://github.com/JuliaLang/julia/pull/22717) where it was decided to keep it to be consistent with `Set` constructors.
