Bracing Style
Started by: Bob GrommesBob Grommes
On: 1173120633|%e %b %Y, %H:%M %Z|agohover
Number of posts: 3
rss icon RSS: New posts
Summary:
A gentle rib about the One True Bracing Style
Bracing Style
Bob GrommesBob Grommes 1173120633|%e %b %Y, %H:%M %Z|agohover

I'm sorry to see that you've chosen BSD / Allman style bracing. I am one of those people who prefer K&R / 1TBS — I hate vertical scrolling. I wouldn't mind accomodating other styles as much if I could set bracing in VS on a per-solution basis, but AFAIK that can't be done.

Anyway … no big deal and no desire to start a Religious War. Just had to throw this one out there ;-)

unfold Bracing Style by Bob GrommesBob Grommes, 1173120633|%e %b %Y, %H:%M %Z|agohover
Re: Bracing Style
alexexmachinaalexexmachina 1173121716|%e %b %Y, %H:%M %Z|agohover

Hey Bob,
Glad to see the forum is working now! Thanks for the comment, what it comes down to is, I have preferences about coding styles, however, if the majority of contributors and users would rather use a different code style, like with the braces, we would switch to using that. I'm used to seeing the BSD style bracing so to me, that's readable, but if it happens that that's actually a very uncommon and/or disliked style, then it's obviously not readable to everyone else and therefore a detriment to the project and the readability.

I can always adapt to things like this, so if others are reading this, please throw in your 2 cents! If you like The One True Bracing Style, sound off and Bob will thank you when we change the standards :)

If you're curious about different standards for bracing/indention you might find the wikipedia article interesting: Indent Style.

unfold Re: Bracing Style by alexexmachinaalexexmachina, 1173121716|%e %b %Y, %H:%M %Z|agohover
Re: Bracing Style
Bob GrommesBob Grommes 1173127381|%e %b %Y, %H:%M %Z|agohover

I think you'll find that BSD-type bracing is more prevalent in the C# world, although K&R is by no means a rarity. I'm guessing about one-third K&R, two-thirds BSD. At least based on my own experience.

I just hate devoting an entire line to a bracket. I don't like brackets *that* much. On the other hand I leave a line of whitespace between code blocks anyway, so it's truly a matter of personal preference.

unfold Re: Bracing Style by Bob GrommesBob Grommes, 1173127381|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.