I just stumbled over the following problem using @show
:
julia> @show a=4/2+1;
a = 4 / 2 + 1 = 3.0
julia> @show a=4/2 +1;
a = 4 / 2 = 2.0
1 = 1
julia> a
2.0
julia> @show a=(4/2 +1);
a = 4 / 2 + 1 = 3.0
julia> a
3.0
In the second example the space obviously split the expression into two, which I did not expect and I also did not recognise as such at first. This caused me quite some trouble during debugging, since I did not expect @show
to essentially alter my code. You could argue that I should not have put a space, but in my case the space was even unavoidable, since I used something like this
julia> @show a=(4,3).÷2 .+1;
a = (4, 3) .÷ 2 = (2, 1)
(.+)(1) = 1
I am using Julia V1.8.2.