I’ve spent quite a bit of time hunting down a bug that was caused by redefining a Base type. E.g.:
Int = find(something) # I am finding interior nodes in a grid # a function defined somewhere else in the notebook function do_something() A = Int push!(A, 5) end do_somthing() # ERROR: MethodError: no method matching push!(::Int64, ::Int64)
It took me a while to find this. Obviously I should have chosen better naming. But in a notebook neither syntax highlighting warned me, nor an actual Julia warning.
What surprised me is
const T = Int64; T = 5throws an error
Int = 3or
Float64 = sqrtis ok.
Should these "standard types" for lack of a better name be `const`?