23 ms·
Re: complex conditionals I contributed some code to a FOSS project recently which is written in C. In my 10 lines of contributions, 3 were a complex conditiona
by tugu77 2y ago
Re: complex conditionals
I contributed some code to a FOSS project recently which is written in C. In my 10 lines of contributions, 3 were a complex conditional. I'd have loved to do what the article suggests, with some intermediate booleans. But that C version would have required me to define those variables at the beginning of the function, a hundred lines earlier instead of just right there. No way that's going to fly, so now they will need to live with a complex conditional. It's one of those "modern language" features which C fanatics generally frown upon but which makes code much easier to read.
- mrkeen 2y agoCan you not move to c99?
- pegas1 2y agoYes, I remember those times, trying to do structured programming in the unstructured environment. So, we both know that even very complex conditionals can be made readable by CRLFs, TABs, and inline comments. It is not about the language, it is about the person.