C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Rust vs C/C++ vs C++ Superset

From: Jarrad Waterloo <descender76_at_[hidden]>
Date: Wed, 28 Sep 2022 12:46:14 -0400
Agreed, I mentioned that in the F43 direct dangling reduction attachment.
There is no scenario in which that is ever good. It is always bad.
Making the compiler more complex to report that as an error doesn't make
the language more complex. We would just be making the compiler take more
responsibility for the stack which it is already responsible for.
The compiler doesn't even have to look outside the function to see that it
is wrong, since it is a direct local instead of an indirect one.


On Wed, Sep 28, 2022 at 12:29 PM Phil Bouchard <boost_at_[hidden]> wrote:

>
> On 9/28/22 12:03, Jarrad Waterloo wrote:
>
> Please review the " temporary storage class specifiers" and "C++ is the
> next C++" attachment. It could be the avenue of making some of these
> changes in the language. It is an example of changing one of C++ defaults.
> It provides the means to have the change now for those who need and want it
> and a path for those who can't to migrate over to the new default.
>
> Yeah I agree with that, in a way to make C++ stricter, safer and simpler.
> I would add also: "return of reference to local variables":
>
> int & foo()
>
> {
>
> int i;
>
> return i;
>
> }
>
> Apparently this issue is not even detected by Visual Studio C++ in 2022.
>
> But again, C++ needs to be simplified, not made more complex, or else it's
> a "time bomb" for C++ quite simply.
>
>
> Regards,
>
> --
> [image: Logo] <https://www.fornux.com/>
> *Phil Bouchard* [image: facebook icon]
> <https://www.linkedin.com/in/phil-bouchard-5723a910/>
> CTO
> T: (819) 328-4743
> E: phil_at_[hidden] | www.fornux.com
> 1188 rue Saint-Louis | Gatineau (Qc), J8T 2L8 Canada
> [image: Banner] <https://goglobalawards.org/> Le message ci-dessus, ainsi
> que les documents l'accompagnant, sont destinés uniquement aux personnes
> identifiées et peuvent contenir des informations privilégiées,
> confidentielles ou ne pouvant être divulguées. Si vous avez reçu ce message
> par erreur, veuillez le détruire.
> This communication (and/or the attachments) is intended for named
> recipients only and may contain privileged or confidential information
> which is not to be disclosed. If you received this communication by mistake
> please destroy all copies.
>

Received on 2022-09-28 16:46:26