News for hackers. Stuff that matters.
Re:C++20, How Hard Could It Be by layer8 on Sunday September 25, 2022 @01:14PM (#32973505)
`std::this_thread::yield` already existed at the time, and “yield” was presumed to also be a common identifier in financial and agricultural contexts.

I’m nevertheless surprised that new noncontextual and previously-unreserved-identifier keywords were added at all. In earlier times, the approach would have been to use a reserved identifier like “_Yield” for the keyword, and to provide a standard opt-in header that would `#define yield _Yield`. Maybe they don’t want to add dependencies on the preprocessor anymore.

Re:C++20, How Hard Could It Be by Sharlin on Sunday September 25, 2022 @02:06PM (#32974121)
I’m not sure C++ has ever used the `_Yield` hack, except for C compatibility? C on the other hand uses it all the time.
Re:C++20, How Hard Could It Be by layer8 on Sunday September 25, 2022 @03:07PM (#32974846)
It could be that I'm remembering it from C.
Re:C++20, How Hard Could It Be by chippiewill on Sunday September 25, 2022 @04:31PM (#32975839)
It's super common in C because C doesn't have namespaces and templates which means stuff C++ implements as namespaced library classes C has to implement as language keywords.

A good example is atomics. C++11 introduced `std::atomic`, C11 introduced the keyword `_Atomic`

Re:C++20, How Hard Could It Be by nickysielicki on Monday September 26, 2022 @12:56AM (#32979576)
Such a weak argument, you can fix this in your entire code base with a single call to sed. There is no reason to introduce a language feature with some weird prefix instead of changing existing code and having them prefix their variable names.