[cfp-interest 3518] action item to review "return type" and "return value" usage
Jerome Coonen
jcoonen at gmail.com
Mon Jun 9 23:01:37 PDT 2025
Greetings,
I took an action in May to review the usage of "return type" and "return
value" throughout C2Y draft N3550. At issue is the change Damian has
proposed in N3537 <https://wiki.edg.com/pub/CFP/WebHome/n3537.pdf>. Where
there more cases where "return value" ought to say "return type"?
The exec summary is that I found no issues with any uses of "return type".
I did find several usages of "return value" similar to the situation in
N3537.
*---return type---*
All of the ~137 instances of "return type" are appropriate usage.
*---return value---*
Of the ~49 instances of "return value(s)", four exhibit the type-vs-value
issue in N3537.
7.3.1#4
Usage: Each synopsis, other than for the CMPLX macros, specifies a family
of functions consisting of a principal function with one or more double
complex parameters and a double complex or double return value; and other
functions with the same name but with f and l suffixes which are
corresponding functions with float and long double parameters and return
values.
This is part of proposal N3537.
7.12.1#1
Usage: The header <math.h> declares two types and many mathematical
functions and defines several macros. Most synopses specify a family of
functions consisting of a principal function with one or more double
parameters, a double return value, or both; and other functions with the
same name but with f and l suffixes, which are corresponding functions with
float and long double parameters, return values, or both.
This is similar to but simpler than 7.3.1 above, which required attention
to the CMPLX macros. In this case, we would just change "return value" to
"return type" in both instances, preserving the plural in the latter case.
H.9#2
Usage: Each function synopsis in 7.3 specifies a family of functions
including a principal function with one or more double complex parameters
and a double complex or double return value. This subclause expands the
synopsis to also include other functions, with the same name as the
principal function but with fN and fNx suffixes, which are corresponding
functions whose parameters and return values have corresponding real types
_FloatN and _FloatNx.
This is similar to 7.12.1 above.
H.11.1#4
Usage: Most function synopses in 7.12 specify a family of functions
including a principal function with one or more double parameters, a double
return value, or both. The synopses are expanded to also include functions
with the same name as the principal function but with fN, fNx, dN, and dNx
suffixes, which are corresponding functions whose parameters, return
values, or both are of types _FloatN, _FloatNx, _DecimalN, and _DecimalNx,
respectively.
This is similar to 7.12.1 above.
A logical next step is to discuss a new proposal to bring these latter
three cases in line with 7.3.1. Hope this helps.
-Jerome Coonen
650.996.4738
jcoonen at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20250609/37ffdd0e/attachment.htm>
More information about the cfp-interest
mailing list