4 ms·
Not a C++ expert, but I first encountered it 20 years ago with Windows API and it looked uglier than some dialects today. Agreed, it's not optimal when the comp
by immmmmm 6y ago
Not a C++ expert, but I first encountered it 20 years ago with Windows API and it looked uglier than some dialects today. Agreed, it's not optimal when the complier spits 100k lines of error messages for a single template typo, yet it's a pretty nice language to code with.
I remember talking with one of the world best HPC expert and he said that it's the most advanced language today when it comes to optimisation. Don't know if that still applies.
A question while we are at it:
// Am I the only one left on this planet using this style of bracketing:
void foo()
{
cout << "brackets like that are more readable!" << endl;
}
- Const-me 6y ago> he said that it's the most advanced language today when it comes to optimisation. Don't know if that still applies. I wrote quite a lot of HPC-like code lately. Can confirm. The reasons include first-party support for hardware intrinsics on all platforms (SIMD is the most important, but also scalar stuff like popcnt, pdep/pext, etc.), full control over RAM layout which allows to optimize data structures for cache friendliness, and the ecosystem of high-quality third party libraries.
- immmmmm 6y agoexactly! i did try to optimise fortran and it was quite painful for little gain.. BTW it was him: http://www.theochem.ruhr-uni-bochum.de/~legacy.akohlmey/index.html http://www.theochem.ruhr-uni-bochum.de/~legacy.akohlmey/inde...
- jandrese 6y agoThat's my preferred way of doing brackets, especially in languages where brackets are optional. I'm also a weirdo that likes default tabstops, subscribing to the philosophy that if your code is getting indented too far you might need to step back and reconsider what you're doing.
- olvy0 6y agoI use this sort of brackets too! I find them much more readable than any other style. That's just my personal view, but I find code which uses the brace in the function declaration to be disorienting when I'm reading it. My eyes are traveling around trying to see where the first line of the function is. I also write a bit of Rust and I find Rust's nagging me to use the "default" brace style annoying. IMO this is very much a personal taste issue, it depends on how someone grew up learning to read, what programming languages they grew up with, etc.