Date: Sun, 13 Sep 2020 09:10:28 -0700
On Saturday, 12 September 2020 23:45:51 PDT Dusan Jovanovic (DBJ) via Std-
Proposals wrote:
> imagine we are developing only in C11
No, that's not an acceptable beginning state. We're talking about changing the
C++23 (or later) standard library. Whoever is going to use this class is going
to be writing modern C++ code, so it assumes they are comfortable with C++20
state-of-the-art.
Therefore, even if you assume the potential users all agree on using the
concept / paradigm you're talking about, you have to compare to what exists in
the C++20 Standard Library, not to C11.
> . we will still use the "metastate"
> paradigm. and we will simply return struct made of two pointers. (less than
> a minute Jason :) ...std::valstat is just an ISO C++ form. Lets imagine
> there are three companies: jason, dbj and dejan. al of them could use
> std::valstat but jason::valstat will do and dbj::valstat will do etc ...
>
> Customers will be all handling the returns (not just errors) in the same
> uniform "metastate" way. coming from both jason or dbj API's. And if dejan
> delivers his metastate enabled API written in C, customers will add and use
> that too completely transparently as far as returns handling are concerned.
What you're proposing here is therefore not really about your template class,
but about how the users consume APIs that use the paradigm. Your examples in
the proposal draft don't show the class name in users' code, but only
structured bindings. That tells me you're arguing more about a way of
programming and less about a specific class.
Therefore, THAT is what you should argue. If you think we need to be able to
be compatible with a C way of doing something similar, please argue that and
how C libraries would implement it.
And you need to show how this will be adopted by library writers.
>From my point of view, it looks like (you think) you have a solution but have
yet to convince anyone about using it, so you want to add it to the standard
to get your wish. If your argument is that this is more about how the users
write code and it really doesn't matter what the C++ standard has, then prove
it that users will adopt it by making it happen without the standard.
Proposals wrote:
> imagine we are developing only in C11
No, that's not an acceptable beginning state. We're talking about changing the
C++23 (or later) standard library. Whoever is going to use this class is going
to be writing modern C++ code, so it assumes they are comfortable with C++20
state-of-the-art.
Therefore, even if you assume the potential users all agree on using the
concept / paradigm you're talking about, you have to compare to what exists in
the C++20 Standard Library, not to C11.
> . we will still use the "metastate"
> paradigm. and we will simply return struct made of two pointers. (less than
> a minute Jason :) ...std::valstat is just an ISO C++ form. Lets imagine
> there are three companies: jason, dbj and dejan. al of them could use
> std::valstat but jason::valstat will do and dbj::valstat will do etc ...
>
> Customers will be all handling the returns (not just errors) in the same
> uniform "metastate" way. coming from both jason or dbj API's. And if dejan
> delivers his metastate enabled API written in C, customers will add and use
> that too completely transparently as far as returns handling are concerned.
What you're proposing here is therefore not really about your template class,
but about how the users consume APIs that use the paradigm. Your examples in
the proposal draft don't show the class name in users' code, but only
structured bindings. That tells me you're arguing more about a way of
programming and less about a specific class.
Therefore, THAT is what you should argue. If you think we need to be able to
be compatible with a C way of doing something similar, please argue that and
how C libraries would implement it.
And you need to show how this will be adopted by library writers.
>From my point of view, it looks like (you think) you have a solution but have
yet to convince anyone about using it, so you want to add it to the standard
to get your wish. If your argument is that this is more about how the users
write code and it really doesn't matter what the C++ standard has, then prove
it that users will adopt it by making it happen without the standard.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Software Architect - Intel DPG Cloud Engineering
Received on 2020-09-13 11:10:37