Almost all the code I've seen until now uses the following style for curly braces:
void swap(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
Visual Studio also defaults to this. However I have read Code Complete 2nd edition and Steve McConnell argues against this style. "Avoid unindented being-end pairs (...) Although this approach looks fine, it (...) doesn't show the logical structure of the code. Used this way, the begin and end aren't part of the control construct, but they aren't part of the statements after it either." Steve McConnell recommends using the pure block style, which emulates Visual Basic (where there's no curly braces):
void swap(int &a, int &b) {
int temp = a;
a = b;
b = temp;
}
or this (begin-end block boundaries):
void swap(int &a, int &b)
{
int temp = a;
a = b;
b = temp;
}
Although I tend to agree with McConnell's reasoning, all the books I read, the classes I attended, and Visual Studio, use the first style, so I find it a bit weird. What do you think?
> And, of course, it includes in-game purchases.
Sigh.. of course it does. I just don't understand why anyone would want to play this on PC, when the far superior AoE 2/DE exists.
Just kill this with fire already. Or a trebuchet.
Normally you'd just want to use Ventoy, but Rufus is handy when:
- Ventoy doesn't work (some BIOSes can be weird)
- You're mainly interested in creating a single Windows live USB and not interested in a multi-boot / Linux USBs
- You want to automate your Windows installations (Rufus supports creating/injecting an autounattend.xml file which fully automates a Windows install). You can do this with Ventoy as well, but it requires a bit more of an effort.
Also worth nothing is that both automatically bypass Windows 11's artificially imposed restrictions (TPM, CPU etc).
IBM are good at announcing stuff, but not at actually delivering it...
How many decades ago did they announce quantum computers, and here we are in 2026, with CHINA delivering them, and IBM still talking...
It sounds like you’re trying to rewrite a narrative to align this layoff with your political beliefs. Games can be horrible, whatever backwards notions you have don’t change that bungie has problems, mostly with just bad games, and arrogance. When they pushed Microsoft to let them be independent they lost their way. They hired on a bunch of people and they couldn’t justify the employee count consistent with their revenue.
Question
Andre S. Veteran
Almost all the code I've seen until now uses the following style for curly braces:
void swap(int &a, int &b) { int temp = a; a = b; b = temp; }Visual Studio also defaults to this. However I have read Code Complete 2nd edition and Steve McConnell argues against this style. "Avoid unindented being-end pairs (...) Although this approach looks fine, it (...) doesn't show the logical structure of the code. Used this way, the begin and end aren't part of the control construct, but they aren't part of the statements after it either." Steve McConnell recommends using the pure block style, which emulates Visual Basic (where there's no curly braces):
void swap(int &a, int &b) { int temp = a; a = b; b = temp; }or this (begin-end block boundaries):
void swap(int &a, int &b) { int temp = a; a = b; b = temp; }Although I tend to agree with McConnell's reasoning, all the books I read, the classes I attended, and Visual Studio, use the first style, so I find it a bit weird. What do you think?
Link to comment
https://www.neowin.net/forum/topic/630296-curly-braces-placement-and-indentation/Share on other sites
63 answers to this question
Recommended Posts