You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array{T}(), which constructs an uninitialized zero-dimensional Array of T, seems slightly ambiguous given the existence of the zero-argument Vector constructors Array{T,1}()/Vector[{T}](). (That is, Array{T}() seems ambiguous as opposed to the explicit Array{T,0}().) This slight ambiguity tripped me up a number of times while working on the Array(shape...) -> Array(uninitialized, shape...) transition. Thoughts? Thanks!
The text was updated successfully, but these errors were encountered:
I suppose Array{T}() is the integer-series-accepting equivalent of Array{T}(()) / the base case for integer-series-accepting Array constructors. With the Array(shape...) -> Array(uninitialized, shape...) transition (ref. #24595), the tuple form Array{T}(()) becomes Array{T}(uninitialized, ()), and the higher-dimensional integer-series-accepting form Array{T}(ints...) becomes Array{T}(uninitialized, ints...), leaving Array{T}() an odd case. Array{T}(uninitialized) would be the consistent replacement. Thoughts?
Investigating a bit further reveals that, in the Array(shape...) -> Array(uninitialized, shape...) deprecation, Array{T}() will automatically deprecate to Array{T}(uninitialized) alongside the other constructors in that family, making this ambiguity negligible. Hence closing. Thanks all!
Array{T}()
, which constructs an uninitialized zero-dimensionalArray
ofT
, seems slightly ambiguous given the existence of the zero-argumentVector
constructorsArray{T,1}()
/Vector[{T}]()
. (That is,Array{T}()
seems ambiguous as opposed to the explicitArray{T,0}()
.) This slight ambiguity tripped me up a number of times while working on theArray(shape...)
->Array(uninitialized, shape...)
transition. Thoughts? Thanks!The text was updated successfully, but these errors were encountered: