Wait, so the words "concepts" and "requires" were newly made keywords, and this breaks code, but the words "yield" and "await" were determined too important and too common to standards members that they needed to be renamed to the horrifically ugly "co_await" and "co_yield"? Also, last time I actually tried to use C++20 none of the standard library implementations had std::format; has this changed now?
One day in the far away future the standard C++ hello world will use 'import std;' and 'std::print' and it will be glorious.
C++20, How Hard Could It Be
101–110 of 444 posts
Re: C++20, How Hard Could It Be
#102Earlier quoted context omitted.
One day in the far away future the standard C++ hello world will use 'import std;' and 'std::print' and it will be glorious.
When I was going to university the computer science department's primary system had two compilers available, GCC 2.96[0] and TenDRA. GCC was generally more popular but it didn't have std::string and any code that threw an exception would crash, so adventurous students would use TenDRA for development. One of the stranger behaviors of TenDRA was that it put all standard library symbols, including the C headers , into…
It's sort-of recorded. It's not in the version list since there wasn't a release, just distros making a mess:
Re: C++20, How Hard Could It Be
#103Earlier quoted context omitted.
Rust does well on this front. There's a new release every 6 weeks, and majority of users jump on it straight away (to complete shock of everyone not used to it). Rust has editions which keep old code working without any changes, even if you mix it with new code, even if you do it with macros. It has rustfix that automatically migrates majority of the old code. Rust has a standard project layout, standard test runner,…
This how i got traumatized by rust: i had a simple task, 1 day long. Write a routine, use a standard output format, theb parse the results. It was to be presented in front of 20 peers the next day. Decided to try the last part in rust... Did a few tutorials, not all of them "worked," but i scratched my head and moved on. Started writing the parser. No examples worked. Couldn't put together any reference code. Even co…
Re: C++20, How Hard Could It Be
#104Earlier quoted context omitted.
gcc is better than clang on every metric. Sorry, it's the facts. ¯\_(ツ)_/¯
What is the status of ubsan, msan, tsan and others support for GCC though? Last time I checked they were a bit behind. I agree GCC make clang obscolete regarding C++ support and even performance. I don't know a comprehensive alternative to clang linter but I'm sure there are a few. Given that llvm receive more human resources than gcc by far, I once expected it to outperform gcc generally (e.g support for polyhedral…
Where does this GCC is faster thing come from? I personally havent experienced it
Re: C++20, How Hard Could It Be
#105Earlier quoted context omitted.
Whoa, really? Since when?? After a lifetime of using GCC, I (like many others) moved to clang a few years ago, out of frustration with the slow development of GCC, a desire to use new C++ features, and stayed because of the superior error messages and, in my use cases anyway, superior code generation. In addition, I gather it's a much cleaner and easier to maintain code base. As a result, we get to have cool things l…
Gcc pretty consistently delivers slightly faster code.
Re: C++20, How Hard Could It Be
#106It is so ironic, that now that Apple and Google decided to focus on their own language stacks, the C and C++ compiler vendors that profit from clang's license aren't that keen in making the upstream work for catching up with ISO C++. Thus making the once famous clang having an honorable third place in ISO C++ compliancy. Seeing this from a Google team makes it even more ironic.
I think the main differentiators for clang were more readable error messages than the mess GCC had (and still has), and faster compilation (here it lost a bit of its advantage over time). I haven't heard of anyone praising it over GCC based on standard compliance. That said, when I explore weird edge cases in how differently Clang and GCC parse source code, and how differently they optimise it, in my experience Clang…
Same here, but I update my new code as I go if there is a better/safer way to do it that does not impact in any bad way my codebase.
Re: C++20, How Hard Could It Be
#107Earlier quoted context omitted.
gcc is better than clang on every metric. Sorry, it's the facts. ¯\_(ツ)_/¯
Whoa, really? Since when?? After a lifetime of using GCC, I (like many others) moved to clang a few years ago, out of frustration with the slow development of GCC, a desire to use new C++ features, and stayed because of the superior error messages and, in my use cases anyway, superior code generation. In addition, I gather it's a much cleaner and easier to maintain code base. As a result, we get to have cool things l…
Re: C++20, How Hard Could It Be
#108Earlier quoted context omitted.
What is the status of ubsan, msan, tsan and others support for GCC though? Last time I checked they were a bit behind. I agree GCC make clang obscolete regarding C++ support and even performance. I don't know a comprehensive alternative to clang linter but I'm sure there are a few. Given that llvm receive more human resources than gcc by far, I once expected it to outperform gcc generally (e.g support for polyhedral…
At work GCC is a lot slower than clang, the project uses a bit much template magic but still, clang is faster. Where does this GCC is faster thing come from? I personally havent experienced it
They always claims so.
Re: C++20, How Hard Could It Be
#109Earlier quoted context omitted.
Whoa, really? Since when?? After a lifetime of using GCC, I (like many others) moved to clang a few years ago, out of frustration with the slow development of GCC, a desire to use new C++ features, and stayed because of the superior error messages and, in my use cases anyway, superior code generation. In addition, I gather it's a much cleaner and easier to maintain code base. As a result, we get to have cool things l…
Gcc pretty consistently delivers slightly faster code.
Hurrah for competition!
(of course, neither GCC or clang could _ever_ beat ICC at some of my tests.. grumble)
Re: C++20, How Hard Could It Be
#110But here I found some benchmarks (did not inspect though): https://www.phoronix.com/review/11900k-gcc11-clang12/2