Liste des Groupes | Revenir à cl c |
On 04/04/2025 11:40, Muttley@DastardlyHQ.org wrote:On Thu, 3 Apr 2025 15:58:05 +0200>
David Brown <david.brown@hesbynett.no> wibbled:Human readers prefer clear code to comments. Comments get out of sync -
code does not.
Thats not a reason for not using comments.
It is a reason for never using a comment when you can express the same
thing in code.
>
If that's your problem, write better code - not more comments.
>
Comments should say /why/ you are doing something, not /what/ you are doing.
Except its not unreachable is it?>
It /is/ unreachable. That's why I wrote it.
There's nothing in C to prevent you>
calling that function with a value other than defined in the enum so what
happens if there's a bug and it hits unreachable?
There's nothing in the English language preventing me from calling you a
"very stable genius" - but I can assure you that it is not going to happen.
Oh thats right , its>
"undefined" ie , a crash or hidden bug with bugger all info.
Welcome to the world of software development. If I specify a function
as working for input values "red", "green", and "blue", and you choose
to misuse it, that is /your/ fault, not mine. I write the code to work
with valid inputs and give no promises about what will happen with any
other input.
Also FWIW, putting seperators in the hex values makes it less readable to me>
not more.
Again, that's /your/ problem.
Les messages affichés proviennent d'usenet.