C++ Logo

std-proposals

Advanced search

Re: explicit class

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Tue, 12 Nov 2019 16:08:28 +0000
ADA solves this problem with the forever construct, allegedly created
because so many of the programs written in ADA terminated with Rapid
Planned Dissasembly.

On Tue, Nov 12, 2019 at 3:55 PM Thiago Macieira via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> On Monday, 11 November 2019 23:54:06 PST Andrey Semashev via Std-Proposals
> wrote:
> > > As to the destructor, my answer is yes. Consider a class that holds
> > > global state for a non-terminating process. We would certainly want
> the
> > > developer to consider what should happen if the object somehow gets
> > > destroyed! The explicit keyword would force such thinking.
> > People normally don't write a program that never terminates. You have to
> > have some condition upon which you terminate. At least, on user input or
> > a signal.
>
> Also, the compiler doesn't know the process never terminates. If the
> variable
> has static, thread or automatic scope, the compiler needs to generate the
> destruction code.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel System Software Products
>
>
>
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2019-11-12 10:11:01