Sure, it gives freedom. But if you are reading someone else code it means you have to learn all the possible ways.
And it may lead to unexpected inconsistencies.
Some examples.
Use the new package manager (using Pkg
):
- pkg>
add DataFrames
- julia>
pkg"add DataFrames"
- julia>
Pkg.add("DataFrames")
But:
- pkg>
add https://github.com/JuliaData/DataFrames.jl.git
- julia>
pkg"add https://github.com/JuliaData/DataFrames.jl.git"
- julia>
Pkg.add("https://github.com/JuliaData/DataFrames.jl.git")
ERROR: https://github.com/JuliaData/DataFrames.jl.git is not a valid packagename
Concatenate strings:
a=“one”; b=“two” :
c = string(a,b)
c ="$a$b"
c = a*b
But a=1; b=2:
c = string(a,b) # "12"
c ="$a$b" # "12"
c = a*b # 2
Create a column vector:
a = [1;2;3]
a = [1,2,3]
Create an empty (zero-elements) array:
a = T[]
a = Array{T,1}()
a = Vector{T}()