[Python-Dev] Update PEP 7 to require curly braces in C (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Mon Jan 18 23:27:21 EST 2016
- Previous message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Next message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Brett Cannon wrote:
For me, I don't see how::
if (x != 10) return NULL; dosomemore(); is any clearer or more readable than:: if (x != 10) { return NULL; } dosomemore();
Maybe not for that piece of code on its own, but the version with braces takes up one more line. Put a few of those together, and you can't fit as much code on the screen. If it makes the difference between being able to see e.g. the whole of a loop at once vs. having to scroll up and down, it could make the code as a whole harder to read.
-- Greg
- Previous message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Next message (by thread): [Python-Dev] Update PEP 7 to require curly braces in C
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]