2 ms·
Incidentally, this is the exact same problem that we have in the political/legal world: sure, the words of the constitution are written with the unspoken expect
by MrBuddyCasino 4y ago
Incidentally, this is the exact same problem that we have in the political/legal world: sure, the words of the constitution are written with the unspoken expectation that they have a specific meaning, but in practise, whoever is in power can decide the meaning of the words to be what they want them to be:
"As a starting point you need to understand that the C specification is not written in a rigorous language. It relies on making sense of natural language to draw any conclusions from it. If you insist that means you can just interpret it however you want, well, no one can stop you, but it's not a productive activity. The point is human consensus on what it means." [0]
Or, how Alice In Wonderland put it:
“When I use a word,” Humpty Dumpty said in rather a scornful tone, “it means just what I choose it to mean — neither more nor less.”
“The question is,” said Alice, “whether you can make words mean so many different things.”
“The question is,” said Humpty Dumpty, “which is to be master – – that’s all.”
As for the (less interesting) technical argument, I think this one nails it on why it is illegal to truncate:
" "Characters" here are the values representable in unsigned char as fputc is specified to write." [1]
[0] https://twitter.com/RichFelker/status/1451040776855638019 https://twitter.com/RichFelker/status/1451040776855638019
[1] https://twitter.com/RichFelker/status/1451038290006663176 https://twitter.com/RichFelker/status/1451038290006663176