| View Poll Results: If given discretion, which would you use and why? | |||
| Method 1 |
|
5 | 31.25% |
| Method 2 |
|
10 | 62.50% |
| Other |
|
1 | 6.25% |
| Voters: 16. You may not vote on this poll | |||
| New Reply |
Preferred curly brace placement and why. |
Share Thread |
| Sep18-12, 04:10 PM | #18 |
|
|
Preferred curly brace placement and why.
I prefer method one. Mostly because I consider two to be a waste of real estate on my screen. If my methods are so long that I can't see the alignments well, that tells me that I'm probably overcoding it.
I've been on projects where the code gets auto-formatted to method two when it's checked into the code repository. I would much rather see the people that implement that nonsense to focus on putting in proper error handling or commenting their code. On a related note, if you want a good laugh on how not to code, check out the link below. |
| Sep19-12, 06:05 AM | #19 |
|
|
Always Method 2. I find it much easier to read, though the extra line count is annoying.
|
| New Reply |
Similar discussions for: Preferred curly brace placement and why.
|
||||
| Thread | Forum | Replies | ||
| Electric Potential, curly r vs r! | Advanced Physics Homework | 2 | ||
| Loci for z - curly bracket use | Calculus & Beyond Homework | 4 | ||
| permutation 3 (brace yourself) | Linear & Abstract Algebra | 0 | ||