Re: Terminolgy: the verb corresponding to "toString"
- From: Eric Sosman <Eric.Sosman@xxxxxxx>
- Date: Thu, 31 Jul 2008 14:02:25 -0400
Stefan Ram wrote:
Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx> writes:"displays" the width and height in both metric and imperial measure
»o.toString()« "designates", "denotes", "gives", "expresses" a string, or "evaluates to" a string.
(I do not use »returns« here, because an expression does not
»return« its value. »2« does not »return« 2, it designates 2.
I use »return« only when I want to take the point of view of
the /implementation/ of a method. It is the view from /inside/
a method that can use »return«.)
Since Roedy asked about how to describe the toString() method,
"return" seems all right to me. If you're more fastidious, you
might substitute "@return" ;-)
Like you, though, I dislike using "return" for an expression
or sub-expression. The verbs "yield" or "produce" seem better:
"The + operator produces the sum of its operands" or "This expression
yields the smallest prime number greater than x." Even those aren't
always good, though; I'd avoid using either of them to describe the
[] or . operator, for example.
--
Eric.Sosman@xxxxxxx
.
- References:
- Terminolgy: the verb corresponding to "toString"
- From: Roedy Green
- Terminolgy: the verb corresponding to "toString"
- Prev by Date: Re: I'm annoyed
- Next by Date: Connecting Via HTTPS
- Previous by thread: Re: Terminolgy: the verb corresponding to "toString"
- Next by thread: ThreadPoolExecutor backport
- Index(es):