But still, it would seem the range index should be unsigned - what would be the purpose of it being signed? Similarly, the slice indexing should be unsigned as well. Just thinking about it...
> On Apr 28, 2019, at 10:03 AM, andrey mirtchovski <mirtchov...@gmail.com> > wrote: > >> So, the question is: why ‘i’ isn’t treated as unsigned, since it is a range >> index - won't it always be positive? > > The author of the PR was most likely working on Go's tip (what will > become 1.13), where the requirement that the right operator in a shift > is an unsigned integer has been lifted. > > compare the third paragraph between these versions: > > https://tip.golang.org/ref/spec#Operators > https://golang.org/ref/spec#Operators > > -- > 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. -- 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.