Re:Go 2, here we come
by Vendan on Friday November 30, 2018 @07:33PM
(#18574126)
no, I get that, but int is not for pointer<->integer conversions. That is very specifically a separate type:
https://golang.org/ref/spec#Numeric_types
[ Parent
| on HN ]
Sure, but did I imply it was? Iām genuinely confused.
> language allows casting pointers to integers
The original thread was about converting int to be an arbitrary precision type: "so that 'int' can become a true integer". One would imagine that, to preserve the ability to do pointer <-> non-pointer number, they would just leave uintptr alone, and so basically ignore your concerns, whereas int as the "native type" for slice indexes and the like is a more likely reason to prevent messing with "int" itself
Okay, that's the source of the confusion. I was not replying to that sentiment, which is a nuanced discussion on what an int should be. I was replying to the_clarence's categorical dismissal of variable width integer types.