No, it’s terrible! The “useful” part of the error message, Union{Nothing, Integer}
is a far too cryptic way to say, “Hey buddy, use a dang Integer instead of a Float!”
And I’m not trying to be a troll here, but I actually still can’t mentally parse what Union{Nothing, Integer}
is actually saying. All users can do is try to figure it out from the words that are there. I tried entering it into the REPL and it returned Union{Nothing, Integer}
. I tried searching the help docs for Nothing
because that part is very confusing, and this is what I got:
help?> Nothing
search: Nothing nothing isnothing
Nothing
A type with no fields that is the type of nothing.
See also: isnothing, Some, Missing.
Sorry to revert back to insults, but it’s a lousy, no-good error message!