it’s easy to make mistakes because of integer overflows.
this is the reason why len returns a signed integer,
if it were a unint, in the code snippet below, the value of i will always remain positive because i will overflow.
example from The Go Programming Language book :)
it’s easy to make mistakes because of integer overflows.
this is the reason why len returns a signed integer,
if it were a unint, in the code snippet below, the value of i will always remain positive because i will overflow.
example from The Go Programming Language book :)
thanks for the explanation Amos :)
thanks for the explanation Amos :)