C++ Logo

std-proposals

Advanced search

Re: P2192 R1 -- request for comments

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 12 Sep 2020 09:17:35 -0700
On Friday, 11 September 2020 09:29:54 PDT Jason McKesson via Std-Proposals
wrote:
> As for the users in the scenario you suggest, I would say that your
> motivation section is basically designing out all other possibilities
> arbitrarily. There are technical reasons not to use exceptions. There
> are no technical reasons not to use output parameters or out-of-band
> error reporting. They may not be great solutions, but they are
> *functional* solutions to those problems. So if those solutions are
> warranted, they should be used.

Especially since a complex return type like the proposed valstat would be
returned as an implicit output parameter, *including* the regular return
value. So if the criterion for avoiding output parameters was avoiding the
memory reference, the type accomplishes the opposite.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-09-12 11:17:38