3 ms·
> - No curly braces around anything. Do you find curly braces to have some aesthetic? That you like to see it in code for its own sake?
by Dewie 13y ago
> - No curly braces around anything.
Do you find curly braces to have some aesthetic? That you like to see it in code for its own sake?
- mahkoh 13y agoYesterday I reported a bug which had already been fixed several weeks ago but reappeared in a new version. After looking through the original patch and the current version, I found that the bug was caused by significant indentation. The maintainer had decided to add comments and accidentally indented the code one more level, making it part of an if branch. Braces would have prevented this.
- deleted 13y ago[deleted]
- J_Darnley 13y agoNot the curly brace itself but I find it a good marker for a block of code. Something should mark the start and end of a loop or conditional. Bash has esac, fi, and done, for example.