3 ms·
I don't think that would be considered good Go code. It's no shorter than writing out the 3-part for loop, and it is probably slower.
by thomasahle 12y ago
I don't think that would be considered good Go code. It's no shorter than writing out the 3-part for loop, and it is probably slower.
- andrewchambers 12y agowhat extra operations do you think range on a slice would do? The generated assembly is probably the same. Stylistically it is odd however.