←back to thread

The C23 edition of Modern C

(gustedt.wordpress.com)
515 points bwidlar | 1 comments | | HN request time: 0.208s | source
Show context
johnisgood ◴[] No.41854897[source]
Personally this[1] just makes C much more complicated for me, and I choose C when I want simplicity. If I want complicated, I would just pick C++ which I typically would never want. I would just pick Go (or Elixir if I want a server).

"_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).

replies(10): >>41854987 #>>41855182 #>>41855214 #>>41855526 #>>41855553 #>>41856362 #>>41857239 #>>41859032 #>>41860073 #>>41935596 #
1. jlokier ◴[] No.41935596[source]
> what is wrong with NULL?

This code has a bug, and may even crash on some architectures:

    execlp("echo", "echo", "Hello, world!", NULL);
This code doesn't have the bug:

    execlp("echo", "echo", "Hello, world!", nullptr);
Neither does this:

    execlp("echo", "echo", "Hello, world!", (char *)NULL);