3 ms·
> If a platform specific way of doing something works better in some use-case then there should be no shame in using that. I fully agree, but the real problem
by LeifCarrotson 5y ago
> If a platform specific way of doing something works better in some use-case then there should be no shame in using that.
I fully agree, but the real problem is not the limitation to platform-specific logic but the conflation of fundamental requirements and incidental requirements. There's no good way to know when you meant "int" as just a counter of a user's files, or "int" as in a 32-bit bitmask, or "int" as the value of a pointer. For the former, it probably doesn't matter if someone later compiles it for a different architecture, for the latter, if you mean int32_t or uintptr_t, use that!
- dahfizz 5y agoI strongly agree, if only for the readability benefits. Using uintptr_t vs uint64_t vs long long are all technically equivalent, but they convey information to the reader about your intent