Suppose I have a function that returns two values, but I am usually only interested in the first one.
function foo()
nit = 0
res = 1.
while res > 0.1 && nit < 500
nit += 1
res /= 1 + res
end
return res, nit
end
The typical way to signal to someone reading my code that I am not going to use the nit
value would be to write
R, _ = foo()
However, I figured out that in Julia I can simply write
R = foo()
to the same effect.
Is this poor style?