Click here to Skip to main content
15,910,234 members

Survey Results

Where should the braces go?   [Edit]

Survey period: 25 Feb 2001 to 3 Mar 2001

What is your preference for placing braces. See the braces page for a list of options.

OptionVotes% 
Braces starting on control line12215.60
Braces starting on line under control line, non-indented56472.12
Braces starting on line under control line, indented729.21
Braces starting on control line, closeing brace indented162.05
Other (please demonstrate!)81.02



 
GeneralClear and clean code Pin
5-Mar-01 5:37
suss5-Mar-01 5:37 
GeneralRe: Clear and clean code Pin
5-Mar-01 7:37
suss5-Mar-01 7:37 
GeneralRe: Clear and clean code Pin
5-Mar-01 8:29
suss5-Mar-01 8:29 
GeneralRe: Clear and clean code Pin
Alvaro Mendez5-Mar-01 12:53
Alvaro Mendez5-Mar-01 12:53 
GeneralRe: Clear and clean code Pin
6-Mar-01 5:08
suss6-Mar-01 5:08 
GeneralRe: Clear and clean code Pin
James R. Twine6-Mar-01 6:26
James R. Twine6-Mar-01 6:26 
GeneralRe: Clear and clean code Pin
11-Mar-01 14:46
suss11-Mar-01 14:46 
GeneralRe: Clear and clean code Pin
13-Mar-01 6:43
suss13-Mar-01 6:43 
GeneralRe: Clear and clean code Pin
13-Mar-01 6:43
suss13-Mar-01 6:43 
Generalif-else, while, for, switch Pin
2-Mar-01 6:23
suss2-Mar-01 6:23 
GeneralRe: if-else, while, for, switch Pin
GeVanCo3-Mar-01 7:41
GeVanCo3-Mar-01 7:41 
GeneralRe: if-else, while, for, switch Pin
James R. Twine3-Mar-01 9:20
James R. Twine3-Mar-01 9:20 
GeneralRe: if-else, while, for, switch Pin
Christian Graus3-Mar-01 14:13
protectorChristian Graus3-Mar-01 14:13 
GeneralRe: if-else, while, for, switch Pin
GeVanCo3-Mar-01 20:32
GeVanCo3-Mar-01 20:32 
GeneralRe: if-else, while, for, switch Pin
4-Mar-01 14:49
suss4-Mar-01 14:49 
GeneralRe: if-else, while, for, switch Pin
George5-Mar-01 2:02
George5-Mar-01 2:02 
GeneralRe: if-else, while, for, switch Pin
James R. Twine5-Mar-01 2:40
James R. Twine5-Mar-01 2:40 
GeneralHow if-else ? Pin
1-Mar-01 23:53
suss1-Mar-01 23:53 
GeneralRe: How if-else ? Pin
James R. Twine3-Mar-01 9:14
James R. Twine3-Mar-01 9:14 
General... followup question: do you use the same format that your tutor did (incl favourate book) Pin
jkgh28-Feb-01 7:41
jkgh28-Feb-01 7:41 
GeneralRe: ... followup question: do you use the same format that your tutor did (incl favourate book) Pin
James R. Twine28-Feb-01 8:53
James R. Twine28-Feb-01 8:53 
GeneralRe: ... followup question: do you use the same format that your tutor did (incl favourate book) Pin
Chris Losinger28-Feb-01 9:02
professionalChris Losinger28-Feb-01 9:02 
GeneralRe: ... followup question: do you use the same format that your tutor did (incl favourate book) Pin
Gavin Greig28-Feb-01 22:56
Gavin Greig28-Feb-01 22:56 
GeneralRe: ... followup question: do you use the same format that your tutor did (incl favourate book) Pin
Chris Losinger1-Mar-01 4:17
professionalChris Losinger1-Mar-01 4:17 
GeneralRE: uncomfortable standards Pin
Sir Gras of Berger1-Mar-01 7:21
Sir Gras of Berger1-Mar-01 7:21 
I'm coming to the view that enforcing coding standards just isn't that beneficial. If the standards never change, then you better have got it right the first time and what's the chance of that? If they do change, then either you've got multiple standards in legacy code or you've got to rewrite it. Neither is a good solution.

And what if you use code acquired from CodeProject, or at any rate, outside the coverage of your standards? Do you want to rewrite all that code? Even if you're just using a library/API, you're not going to wrap all the member functions/ function calls to change the style from this_is_a_function() to ThisIsAFunction() or vice versa, are you?

I do think coding style consistency is beneficial at the function level and class level, but beyond that it becomes decreasingly important. Another programmer should be able to look at a function, recognize its style and therefore find it easier to read thanks to the consistency of style. That's all that's worth aiming for.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.