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.
I would not let the name distract you - it's equivalent to overloading, not "generics" (i.e. parametric polymorphism)
In that capacity I think it's quite a lot more sane than C++. Having a closed set of overloads, not having name mangling, not having complex name lookup rules are all a good thing.
I have made a lengthy comment about why I dislike C23. I cannot find it right now, but yeah, mainly because it is kind of turning into C++ and I do not like that, that is why I will continue sticking to C99. The earlier version of the book is great for that.
I have to say, of all programming languages, C is the one which gets the most strident opposition to the most minor of changes.
I would love to read your reasoning because so far I have not been able to understand the stiff resistance to what I see are very positive changes aimed at cleaning up so much of the mess that is C.
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++
24 comments
[ 4.3 ms ] story [ 61.3 ms ] threadhttps://inria.hal.science/hal-02383654v2/document
Now better ways of doing strings and arrays, no need for something as modern as 1976's PL/I way of doing them.
I would not let the name distract you - it's equivalent to overloading, not "generics" (i.e. parametric polymorphism)
In that capacity I think it's quite a lot more sane than C++. Having a closed set of overloads, not having name mangling, not having complex name lookup rules are all a good thing.
I would love to read your reasoning because so far I have not been able to understand the stiff resistance to what I see are very positive changes aimed at cleaning up so much of the mess that is C.
https://news.ycombinator.com/item?id=41854897
"...is a deeply hated C feature that everyone likes to dunk on for both being too much and also not being good enough at the same time"
https://thephd.dev/improving-_generic-in-c2y