Next privilege 125 Rep.
Next badge 0/1
0 people reached
- 0 posts edited
- 0 helpful flags
- 22 votes cast
Has variable width types been replaced by fixed types in modern C?
A portion of people just imitates others. I believe the majority of code fixed-bit-type was made conscienceless. No reason to set size neither to not. I have code made primarily on 16 bits platforms (MS-DOS and Xenix of 80s), that just compile and run today on any 64 and benefits of the new word-size and addressing, just compiling it. That is to say that serialization to export/import data is an very important architecture design to keep it portable.
What is the advantage of choosing ASCII encoding over UTF-8?
@Pacerier, if you don't need encoding above 127, choosing ASCII may be worth when you use some API to encode/decode, because UTF needs additional bit verification to consider additional bytes as the same character, it can takes additional computation rather than pure ASCII which just read 8 bits without verification. But I only recommend you to use ASCII if you really need a high level of optimization in large (big large) computation and you know what you're doing in that optimization. If not, just use UTF-8.