Article 6AE8P Catch-23: The New C Standard Sets the World on Fire

Catch-23: The New C Standard Sets the World on Fire

by
janrinok
from SoylentNews on (#6AE8P)

guest reader writes:

ACM Queue magazine has an article with the title "Catch-23: The New C Standard Sets the World on Fire". This article offers opinions and analysis of a new major revision of the C language standard, C23, expected to be voted on in 2023:

[...] Like the previous major revision, C11, the latest standard introduces several useful features. The most important, if not the most exciting, make it easier to write safe, correct, and secure code. For example, the new header standardizes checked integer arithmetic.

[...] C23 also adds new features to protect secrets from prying eyes and programmers from themselves. The new memset_explicit() function is for erasing sensitive in-memory data; unlike ordinary memset, it is intended to prevent optimizations from eliding the erasure.

[...] In addition to these new correctness and safety aids, C23 provides many new conveniences: Constants true, false, and nullptr are now language keywords; mercifully, they mean what you expect. The new typeof feature makes it easier to harmonize variable declarations. The preprocessor can now #embed arbitrary binary data in source files. Zero-initializing stack-allocated structures and variable-length arrays is a snap with the new standard "={}" syntax.

[...] Sadly, good news isn't the only news about C23. The new standard's nonfeatures, misfeatures, and defeatures are sufficiently numerous and severe that programmers should not "upgrade" without carefully weighing risks against benefits. Older standards such as C99 and C11 weren't perfect, but detailed analysis will sometimes conclude that they are preferable to C23.

[...] Developers should also note that C23 has drifted further from C++ than the earlier C standards. The notion that C is (mostly) a subset of C++ is further from reality than ever before.

Magazine article:
Terence Kelly and Yekai Pan. 2023. Catch-23: The New C Standard Sets the World on Fire. Queue 21, 1, Pages 30 (January/February 2023), 19 pages. https://doi.org/10.1145/3588242

Original Submission

Read more of this story at SoylentNews.

External Content
Source RSS or Atom Feed
Feed Location https://soylentnews.org/index.rss
Feed Title SoylentNews
Feed Link https://soylentnews.org/
Feed Copyright Copyright 2014, SoylentNews
Reply 0 comments