C++ Logo


Advanced search

Re: The unnecessary confusion of the C++23 proposal P0847R6

From: Scott Michaud <scott_at_[hidden]>
Date: Sat, 31 Jul 2021 03:28:10 -0400
On 7/31/2021 2:04 AM, Jens Maurer via Std-Discussion wrote:
> This is a feature, not a bug of the current proposal: The interface of a
> class should be completely specified by the class definition, and not
> be scattered.

I disagree with this because extension methods do not have access
(without abusing reflection) to the private or the protected API, which
I argue is the dangerous part. The maintainer of MyClass doesn't need to
consider them when they maintain their internal states... so they're not
really an interface of the class.

They are basically just free functions with a sometimes-more-convenient

Received on 2021-07-31 02:28:14