Date: Fri, 30 Apr 2021 10:50:40 -0400
Apologies for my mention of the mysterious "stack" here.
> We need a possibility to allocate named objects of dynamic size that
> have the lifetime of the scope in which they are defined and where the
> mechanism provides runtime testing for failure. With the proposed
> `defer` construct C is moving very slowly in that direction.
Again, nicely put.
And, we should put in a plug for today's episode of cppcast
https://cppcast.com/ "Defer Is Better Than Destructors"
where some bloke called JeanHeyd talks on this topic.
On Fri, Apr 30, 2021 at 10:39 AM Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]> wrote:
> will,
>
> on Fri, 30 Apr 2021 10:12:26 -0400 you (will wray <wjwray_at_[hidden]>)
> wrote:
>
> > > If C++ wouldn't allow the declaration of VLA, fine,
> > > maybe C could even remove that possibility.
> >
> > What is needed is a safer way to manage stack-
> > allocated data, in both C and in C++.
> > Only then should VLA be deprecated.
> >
> > The stack allocation that VLA provides
> > is preferable to the alternative; alloca
>
> indeed, `alloca` is much worse ;-)
>
> But I would state the need differently, not in terms of "stack"
> (what's that ?-) but in terms of functionality.
>
> We need a possibility to allocate named objects of dynamic size that
> have the lifetime of the scope in which they are defined and where the
> mechanism provides runtime testing for failure. With the proposed
> `defer` construct C is moving very slowly in that direction.
>
> Jₑₙₛ
>
> --
> :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
> :: ::::::::::::::: office Strasbourg : +33 368854536 ::
> :: :::::::::::::::::::::: gsm France : +33 651400183 ::
> :: ::::::::::::::: gsm international : +49 15737185122 ::
> :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
>
> We need a possibility to allocate named objects of dynamic size that
> have the lifetime of the scope in which they are defined and where the
> mechanism provides runtime testing for failure. With the proposed
> `defer` construct C is moving very slowly in that direction.
Again, nicely put.
And, we should put in a plug for today's episode of cppcast
https://cppcast.com/ "Defer Is Better Than Destructors"
where some bloke called JeanHeyd talks on this topic.
On Fri, Apr 30, 2021 at 10:39 AM Jₑₙₛ Gustedt <jens.gustedt_at_[hidden]> wrote:
> will,
>
> on Fri, 30 Apr 2021 10:12:26 -0400 you (will wray <wjwray_at_[hidden]>)
> wrote:
>
> > > If C++ wouldn't allow the declaration of VLA, fine,
> > > maybe C could even remove that possibility.
> >
> > What is needed is a safer way to manage stack-
> > allocated data, in both C and in C++.
> > Only then should VLA be deprecated.
> >
> > The stack allocation that VLA provides
> > is preferable to the alternative; alloca
>
> indeed, `alloca` is much worse ;-)
>
> But I would state the need differently, not in terms of "stack"
> (what's that ?-) but in terms of functionality.
>
> We need a possibility to allocate named objects of dynamic size that
> have the lifetime of the scope in which they are defined and where the
> mechanism provides runtime testing for failure. With the proposed
> `defer` construct C is moving very slowly in that direction.
>
> Jₑₙₛ
>
> --
> :: INRIA Nancy Grand Est ::: Camus ::::::: ICube/ICPS :::
> :: ::::::::::::::: office Strasbourg : +33 368854536 ::
> :: :::::::::::::::::::::: gsm France : +33 651400183 ::
> :: ::::::::::::::: gsm international : +49 15737185122 ::
> :: http://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
>
Received on 2021-04-30 09:50:55