Source
- URL: https://x.com/valigo/status/1990506460531601538
- Author: Valentin Ignatev (@valigo)
- Posted: 2025-11-17 19:44:56
Thread
1/ @valigo
When it comes to pointers, “just use 64 bit integer” is way more intuitive to me. I still remember how confusing it was that “pointer + 1” actually means ”+ size_of(type_we_point_to)” when I learned all this stuff. It still kinda messes me up not gonna lie.
Branches: 2025-11-18-mrsteyk1-i-had-the-displeasure-of-being-exposed-to-hex, 2025-11-18-attamayte1-pointer-arithmetic-based-on-type-sizes-makes, 2025-11-18-furiouswhopper-for-real-im-parsing-through-a-binary-array-and, 2025-11-18-TheBonkMaykr-it-is-confusing-if-you-arent-used-to-it-that-is, 2025-11-18-Ron172892111531-wouldnt-this-make-working-with-arrays-more, 2025-11-25-levs57-interestingly-if-you-try-to-write-rust-in-this
2/ @onelivesleft
@valigo
Distinct syntax for pointer arithmetic would be good. i.e.
ptr += 1; // ptr = ptr + 1;
ptr ++= 1; // ptr = ptr + 1 * size_of(type_of(ptr));
3/ @valigo
@onelivesleft
Not sure I agree with specific sign choice but I kinda dig the concept
4/ @onelivesleft
@valigo
Well, you know, only applicable for languages that don’t have a ++ :P