Parse String to DataType

question
strings

#1

I can do

julia> s = "Complex{Float64}"
"Complex{Float64}"

julia> x = eval(parse(s))
Complex{Float64}

julia> typeof(x)
DataType

Is there a neater way than using eval to interpret the string as a datatype? Why is there no parse(DataType, s)?


#2

x-ref: https://github.com/JuliaLang/julia/issues/24349


#3

Perhaps include_string(s) ?


#4

Thanks for your replies!