C++ Logo

STD-PROPOSALS

Advanced search

Subject: Re: [std-proposals] explicit class
From: Steve Weinrich (weinrich.steve_at_[hidden])
Date: 2019-11-12 15:58:05


Good advice. Thanks.

-----Original Message-----
From: Std-Proposals <std-proposals-bounces_at_[hidden]> On Behalf Of
Thiago Macieira via Std-Proposals
Sent: Tuesday, November 12, 2019 14:16
To: std-proposals_at_[hidden]
Cc: Thiago Macieira <thiago_at_[hidden]>
Subject: Re: [std-proposals] explicit class

On Tuesday, 12 November 2019 10:00:58 PST Steve Weinrich via Std-Proposals
wrote:
> Will the enhancement cause undesirable behavior and/or damage? I
> believe that it does not. Of course, the topic of destruction is the
> big one. I do not feel so strongly about it to suggest that this must
> be an all or nothing implementation. To me, that is for a future
discussion.

Everything that your proposal for explicit class could accomplish can
already be accomplished by explicitly deleting the implicit members. So
it'll only be used as a matter of taste by the programmer in question.

The problem is teachability and language burden. That's a completely
subjective metric. Why do we have two ways of doing things in the language?
You have to think of people reading the code 10 years from now and finding
this obscure corner-case of the language because most people don't use it.
It's like reviewing C99 code like:

  void manipulate(struct Element array[static 8]);

And wondering "wtf is static doing inside the array?"

Since all you're asking for can already be accomplished with a different
syntax, your case needs to be that your syntax is so much easier that it'll
eventually displace the older in circumstances more than "niche" and
"corner- case".

--
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

STD-PROPOSALS list run by herb.sutter at gmail.com

Standard Proposals Archives on Google Groups