Readit News logoReadit News
Alifatisk · 5 months ago
What, is auto and constexpr coming to C?! https://www.open-std.org/JTC1/SC22/WG14/www/docs/n3220.pdf#s...
feverzsj · 5 months ago
At this rate, they may just switch to C++ mode.
pjmlp · 5 months ago
It won't work, modern C is all about being C++ without classes and templates, while coming up with worse approaches (_Generic), apparently.

Now better ways of doing strings and arrays, no need for something as modern as 1976's PL/I way of doing them.

z_open · 5 months ago
auto is insane seeing as how it's already a reserved keyword in C.
eska · 5 months ago
auto is a historic artifact for porting code from the B language to C, when everything was implicitly int but int did not exist yet. It had absolutely no use afterwards, which is why it was repurposed in C++ as well. In C23 this is done because it is very useful in combination with typeof() in macros, which is a far cry from SFINAE terrorism in C++
ndiddy · 5 months ago
I have never seen anyone use auto in code newer than the mid-70s, apart from C++ programmers accidentally using it in a case where it happens to work.
jcelerier · 5 months ago
It used to be in c++ too and I have never even heard of a conflict this caused
johnisgood · 5 months ago
I love Modern C by Jens Gustedt. I will stick to the older version without C23, as I prefer C99, but pretty sure this version is great, too. I learnt a lot from reading this book.
keepamovin · 5 months ago
The INRIA page links to a downloadable PDF version here:

https://inria.hal.science/hal-02383654v2/document

Deleted Comment

Dead Comment