C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Keeping C++ Young: Migrating to Modern C++

From: Jason McKesson <jmckesson_at_[hidden]>
Date: Sun, 5 Nov 2023 10:01:13 -0500
On Sun, Nov 5, 2023 at 8:48 AM Yexuan Xiao via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> It is possible to vote on whether to mark a feature as discouraged. C++ didn't invent nullptr to coexist with NULL. If users continue to use old algorithms instead of constrained algorithms year after year, why is the standards committee working on this? linter is also part of the c++ ecosystem, and the committee should respond. C++ has long been plagued by security problems, print is a safe alternative to printf, and continuing to use printf is hastening the death of C++.

If C++ is dying, it's not because people keep using `printf` and
`NULL`. These kinds of things are not going to make the language more
popular. It won't make the language more attractive to the people who
aren't currently using it.

All it's going to do is make the language harder to write code that
can interface with C.

`nullptr` was added because C++, and *specifically* C++, had
legitimate problems with `NULL`. It messed with overload resolution in
really unpleasant and unexpected ways. C doesn't have overloading, so
that wasn't a problem for them. `std::print` was added because it is
better than `std::printf`, but that doesn't make it *wrong* to use
`printf`.

Received on 2023-11-05 15:01:51