news.volyx.in

The C23 edition of Modern C (gustedt.wordpress.com)

515 points by bwidlar · 661 days ago · 347 comments on HN

Article summary

The C23 edition of Modern C is now available for free download, featuring updates to the new C standard, including new bit-precise types, C library headers, and improvements for enumeration types. The book also covers new concepts such as a nullptr constant, syntactic annotation with attributes, and type generic programming. The author notes that the goal was to publish this new edition at the same time as the new C standard goes through the ISO publication procedure. The book is available for download along with code examples and a dedicated page with more information.

Main themes

  • C programming language
  • C23 standard
  • Modern C
  • Programming languages comparison
  • C++ and C differences
  • Embedded systems programming

What commenters say

  • Using a C++ compiler to compile C code can be a viable option, especially when interfacing with large C codebases or requiring specific C++ features.
  • C++ offers several features that can be useful in embedded systems programming, such as constexpr and RAII, but may not be worth the added complexity and learning curve.
  • Object-oriented programming can be achieved in C, but it may require more manual effort and verbosity compared to languages like C++ or Rust.
  • Some argue that C++ features like function overloading and operator overloading are not essential and may even make code less self-documenting.
  • Others believe that C++ provides valuable abstractions and features that can simplify programming, but may require careful consideration of trade-offs and potential drawbacks.
  • The use of C++ in embedded systems is a topic of debate, with some arguing that it is not necessary and others seeing benefits in its use, particularly with careful management of its features.