I have code that uses uint for element or slicing index, as it elides one 
half of the bounds check (i.e. no need to check if the index >= 0, as it 
always is). 

However, I tend to now convert a lot between int and uint. I would think 
that the conversion between both is free (a no-op at runtime), but wanted 
to get a categorical answer from someone that knows the compiler 
implementation.

Can someone please answer? This is strictly for int <-> uint conversion.

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to