I am new to Julia and I like the language, but one thing I don’t like is the error messages. They are often a big block of mostly incomprehensible text which I suspect might scare some developers away. This is largely due to very complicated type definitions.
I’m not saying that we should remove information just format it nicer, maybe provide some aliases that can be expanded later.
Just look at this cutout of an error message I recently got (from Query.jl): (You could of course blame the developers for making so complicated types, but…)
DataValues.DataValueException()
Stacktrace:
DataValues.DataValueException()
[15] println(::Base.TTY, ::QueryOperators.EnumerableMap{NamedTuple{(:source, :timestamp, :val),Tuple{QueryOperators.GroupColumnArrayView{DataValues.DataValue{String},Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},:psr_meaning},QueryOperators.GroupColumnArrayView{String,Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},:timestamp},Int64}},QueryOperators.EnumerableIterable{Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},QueryOperators.EnumerableGroupBy{Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},QueryOperators.EnumerableIterable{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},Tables.DataValueRowIterator{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},Tables.RowIterator{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{Array{String,1},Array{String,1},Array{String,1},Array{Union{Missing, String},1},Array{Union{Missing, String},1},Array{Union{Missing, Float64},1}}}}}},var"#451#461",var"#452#462"}},var"#454#464"{var"#448#458"}}) at ./strings/io.jl:73
[16] println(::QueryOperators.EnumerableMap{NamedTuple{(:source, :timestamp, :val),Tuple{QueryOperators.GroupColumnArrayView{DataValues.DataValue{String},Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},:psr_meaning},QueryOperators.GroupColumnArrayView{String,Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},:timestamp},Int64}},QueryOperators.EnumerableIterable{Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},QueryOperators.EnumerableGroupBy{Grouping{Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}}},Array{DataValues.DataValue{String},1},NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},QueryOperators.EnumerableIterable{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},Tables.DataValueRowIterator{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{String,String,String,DataValues.DataValue{String},DataValues.DataValue{String},DataValues.DataValue{Float64}}},Tables.RowIterator{NamedTuple{(:timestamp, :market, :type, :psr_meaning, :quantity, :amount),Tuple{Array{String,1},Array{String,1},Array{String,1},Array{Union{Missing, String},1},Array{Union{Missing, String},1},Array{Union{Missing, Float64},1}}}}}},var"#451#461",var"#452#462"}},var"#454#464"{var"#448#458"}}) at ./coreio.jl:4
Inside a small terminal window this is hopeless.
So maybe we could use something like BigLongTypeAlias (automatically) and then expand this at some other place like a type tree/graph. Also there could be a function in the repl that would collapse/hide these long types.
Does anyone agree? I think this can be a huge improvement to the Julia user experience.
(Please excuse me if this has been a topic before, but I couldn’t find anything.)