The C23 edition of Modern C is now available for free
The C23 edition of Modern C is now available for free download, featuring updates like bit-precise types, enhanced enumeration types, and resources for transitioning to C23 on existing platforms.
Read original articleThe C23 edition of Modern C is now available for free download, coinciding with the new C standard's ISO publication process. This edition features significant updates, including new bit-precise types (_BitInt(N)), additional C library headers for arithmetic with overflow checks, and enhancements for enumeration types. Notable new concepts introduced in C23 include a nullptr constant, syntactic annotations with attributes, and improved type generic programming tools such as type inference with auto and typeof. The edition also discusses compound expressions, lambdas, and internationalization, along with a comprehensive approach to program failure. An appendix and a temporary include header have been added to facilitate a smooth transition to C23 on existing platforms. Manning’s early access program for the new edition is still open, although the publication date for the final version has not yet been announced.
- The C23 edition of Modern C is available for free download.
- It includes updates aligned with the new C standard, C23.
- New features include bit-precise types, enhanced enumeration types, and type inference tools.
- The edition provides resources for transitioning to C23 on existing platforms.
- Manning’s early access program for the new edition is currently open.
Related
New Features in C++26
The ISO released new C++ standards on a three-year cycle, with C++26 proposals open until January 2025. Updates include hazard pointers, user-space RCU support, debugging headers, and template enhancements for improved functionality.
Improving _Generic in C2y
The C programming community is enhancing the _Generic feature for the C2y standard to resolve issues from C23, focusing on simplifying type matching and addressing limitations in usability and behavior.
What's new in C++26 (part 1)
C++26 is developing features like specifying reasons for deleted functions, unnamed placeholder variables, structured binding in control statements, and user-generated messages in static_assert, enhancing code clarity and usability.
C Until It Is No Longer C
Artyom Bologov's blog post addresses the complexities of C programming, proposing enhancements like booleans, custom type aliases, and type inference to improve readability and usability for programmers.
C3 lang – A modern C alternative – 0.6.3 released
C3 is a programming language derived from C, emphasizing ergonomics and safety, with features like optionals, SIMD support, and a developing standard library for graphics and game frameworks.
- Some commenters express concerns that the new features complicate the language, preferring the simplicity of earlier versions like C99.
- There is a discussion about the portability of C and skepticism regarding the adoption of new standards.
- Several users highlight the importance of safety in programming, contrasting C with languages like Rust and C++.
- Technical issues with the book's format, such as a non-functional table of contents, have been reported.
- Some readers appreciate the book and its content, while others feel misled about the release status.
Calling big endian "commonly used by modern processor types" when s390x is really the only one left is a bit of a stretch ;D
(Comments about everyone's favorite niche/dead BE architecture in 3… 2… 1…)
If I want to live on cutting edge I would rather use C++2x or Rust rather than C.
Am I missing something? What benefit this supposedly modern C offers?
"_BitInt(N)" is also ugly, reminds me of "_Bool" which is thankfully "bool" now.
[1] guard, defer, auto, constexpr, nullptr (what is wrong with NULL?), etc. On top of that "constexpr" and "nullptr" just reeks of C++.
That said, Modern C is an incredible book, I have been using it for C99 (which I intend to continue sticking to).
https://stackoverflow.com/questions/562303/the-definitive-c-...
So, C23? ... that's nice and all, but, let's talk about it in 20 years or so T_T
char* thing; // good
char *thing; // bad
This ... is awesome. As a C++ "native" I've always found the "star on the right" thing to be really horribly confusing.
Takeaway #1: "C and C++ are different: don’t mix them, and don’t mix them up"
By the way, the US government did the profession no favors by including C++ as a memory-unsafe language. It is possible to write memory-safe C++, safe array dereferencing C++. But it’s not obvious how to do it. Herb Sutter is working on it with CppFront. The point stands that C++ can be memory-safe code. If you make a mistake, you might write some unsafe code in C++. But you can fix that mistake and learn to avoid it.
When you write C, you are in the bad luck shitter. You have no choice. You will write memory—unsafe code and hope you don’t fuck it up. You will hope that a refactor of your code doesn’t fuck it up.
Ah, C, so simple! You, only you, are responsible for handling memory safely. Don’t fuck it up, cadet. (Don’t leave it all to computers like a C++ developer would.)
Put C in the bin, where it belongs.
1) https://gcc.gnu.org/projects/cxx-status.html#:~:text=C%2B%2B...
For instance, only sized types:u8...s64, f32, f64... no implicit casts except for void* and literals, no integer promotion, no switch, no enum, only one loop keyword (loop{}!), no anonymous code block, and no toxic attribute like "packed structure" which makes us lose sight of data alignment... no _generic, typeof, restrict, syntax based tls, etc...
But we would need explicit atomics, explicit memory barriers, explicit unaligned memory access.
Instead of adding and complexifying C to make writing a naive compiler more and more complex, long and a mouse and cat catchup "to the standard" tedious task, what should be done is exactly the other way around.
In end, I don't trust C officials anymore, I tend to stick to C99, or even assembly (I am currently writing rv64 assembly I run an x86_64).
Is the usage of single linked lists still prevalent as the main container type?
Related
New Features in C++26
The ISO released new C++ standards on a three-year cycle, with C++26 proposals open until January 2025. Updates include hazard pointers, user-space RCU support, debugging headers, and template enhancements for improved functionality.
Improving _Generic in C2y
The C programming community is enhancing the _Generic feature for the C2y standard to resolve issues from C23, focusing on simplifying type matching and addressing limitations in usability and behavior.
What's new in C++26 (part 1)
C++26 is developing features like specifying reasons for deleted functions, unnamed placeholder variables, structured binding in control statements, and user-generated messages in static_assert, enhancing code clarity and usability.
C Until It Is No Longer C
Artyom Bologov's blog post addresses the complexities of C programming, proposing enhancements like booleans, custom type aliases, and type inference to improve readability and usability for programmers.
C3 lang – A modern C alternative – 0.6.3 released
C3 is a programming language derived from C, emphasizing ergonomics and safety, with features like optionals, SIMD support, and a developing standard library for graphics and game frameworks.