C++ Logo


Advanced search

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

From: Hani Deek <hani_deek_at_[hidden]>
Date: Sat, 31 Jul 2021 16:28:04 +0000
> OK, so what would this "new syntax" look like?

I have no problem with the syntax that is proposed by the paper. I said that that syntax made me happy when I first saw it, because I thought it was meant to define non-static member functions. It would be logical to use that syntax for that purpose. However, as I progressed in the paper I realized that the proposed syntax was not meant to define non-static member functions but rather a new kind of member functions.

The problem is not with the proposed syntax but with the use that the paper proposes for that syntax.

It is impossible to be a good C++ programmer without understanding the concepts that underly the language. Understanding those concepts becomes easier if people avoid making them more complex for no good reason.

In the current C++ format, the "implicit object parameter" and the "this pointer" are concepts associated with the non-static member functions. There are no implicit object parameter or this pointer for static functions. Also the two types of member functions produce different results when one uses the decltype operator on their expressions.

The P0847R6 proposal messes up those fundamentals for no good reason. It disrupts the current format in order to achieve something that can be achieved differently without any disruption.

Received on 2021-07-31 11:28:08