Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, we considered naming them intptr_t and uintptr_t, but the "use an int to index an array" is so ingrained into programmers' collective consciousnesses that we decided it was pretty futile to go against the grain here.


I don't really buy that reasoning. :-) If the goal is not to clean up bad things, we may just stay with C++.

When a new language comes and the programmer is already having an intention to learn something new, probably is working on a new project, this state is the best opportunity for the cleanup. Once the language matures, legacy codebases become rampant, that opportunity is gone forever with that language.

Did you consider naming the type something like 'index' itself, if that is the predominant good use-case for the type?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: