C++ Logo

std-proposals

Advanced search

Re: Fixing C-style arrays

From: Maciej Cencora <m.cencora_at_[hidden]>
Date: Fri, 13 Mar 2020 00:30:04 +0100
Please read my proposal carefully yet again. I am not proposing to
deprecate core functionality used by millions lines of code.
I am only proposing to deprecate such uses of C-style arrays that lead to
bugs.


pt., 13 mar 2020 o 00:28 Ryan Nicholl <rnicholl_at_[hidden]> napisał(a):

> Nobody is going to take you seriously if you suggest deprecating core
> functionality used by millions of lines of code. This is not another
> "hipster" language. We don't break backwards compatibility without a
> compelling reason. C++ has many years of tradition of "tacking on"
> additional features while leaving the bad alone. Only for compelling
> reasons are features removed. And removing a core language feature is far
> more disruptive than merely removing a library function.
>
> C style arrays are far too common to be removed. Your idea is far too
> radical for a conservative language like C++ where backwards compatibility
> is prized. There are actual code bases using C++, unlike <insert new
> hipster language here>, so we can't just break things for no reason.
>
> Not all software gets abandoned after 6 months. The code I deal with at
> work has parts that were written in 1992. C++ has to remain aware of
> reality.
>
>
>
> -------- Original Message --------
> On Mar 12, 2020, 19:14, Maciej Cencora via Std-Proposals <
> std-proposals_at_[hidden]> wrote:
>
>
> And that's exaclty what I propose to deprecate in C++23.
>
> pt., 13 mar 2020 o 00:09 Lyberta via Std-Proposals <
> std-proposals_at_[hidden]> napisał(a):
>
>> Maciej Cencora via Std-Proposals:
>> > FYI I am in the camp "fix the problem by fixing the root cause", not in
>> the
>> > camp "fix the problem by introducing another way of doing it, and not
>> > really fixing the original problem".
>> >
>> > I am not interested in any feedback from the latter camp.
>>
>> I think the most important part is arrays decaying to pointers and syntax
>> like int[] being accepted.
>>
>> Remove those 2 and you remove 90% of the bugs.
>>
>> --
>> Std-Proposals mailing list
>> Std-Proposals_at_[hidden]
>> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>>
>

Received on 2020-03-12 18:33:04