C++ Logo

std-proposals

Advanced search

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

From: F. v.S. <de34_at_[hidden]>
Date: Sun, 5 Nov 2023 23:59:28 +0000
In C, there's _Generic with which NULL doesn't work well.

在 Jason McKesson via Std-Proposals <std-proposals_at_lists.isocpp.org>,2023年11月5日 23:02写道:

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`.
--
Std-Proposals mailing list
Std-Proposals_at_[hidden]
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals

Received on 2023-11-05 23:59:32