It might be clearer with an example:
julia> x = [1,2,3]
3-element Array{Int64,1}:
1
2
3
julia> [x, 4]
WARNING: [a,b] concatenation is deprecated; use [a;b] instead
in depwarn at deprecated.jl:73
in oldstyle_vcat_warning at ./abstractarray.jl:29
in vect at abstractarray.jl:38
while loading no file, in expression starting on line 0
4-element Array{Int64,1}:
1
2
3
4
Essentially the square brackets used to be shorthand for "vcat(x)", but
that is changing (for good reason... it makes it very hard to make arrays
of arrays, and it can be confusing). With the semicolon there, you are
explicitly asking to use array concatenation syntax.
On Thu, Nov 5, 2015 at 11:24 AM, Alex <[email protected]> wrote:
> Could someone please explain the meaning of
>
> "[a] concatenation is deprecated "
>
> ?
>
> [a] - is a notion for a vector / an array.
>
> Where concatenation is happening and how [;] fixes the problem?
>
> -- Alex
>
> On 11/4/2015 8:43 PM, paul analyst wrote:
> > _
> > _ _ _(_)_ | A fresh approach to technical computing
> > (_) | (_) (_) | Documentation: http://docs.julialang.org
> > _ _ _| |_ __ _ | Type "?help" for help.
> > | | | | | | |/ _` | |
> > | | |_| | | | (_| | | Version 0.4.0 (2015-10-08 06:20 UTC)
> > _/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
> > |__/ | x86_64-w64-mingw32
> >
> > julia> a=[1:1:10]
> > WARNING: [a] concatenation is deprecated; use collect(a) instead
> > in depwarn at deprecated.jl:73
> > in oldstyle_vcat_warning at abstractarray.jl:29
> > in vect at abstractarray.jl:32
> > while loading no file, in expression starting on line 0
> > 10-element Array{Int64,1}:
> > 1
> > 2
> > 3
> > 4
> > 5
> > 6
> > 7
> > 8
> > 9
> > 10
> >
> > julia>
>
>