Re: Terminolgy: the verb corresponding to "toString"
- From: Roedy Green <see_website@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 Jul 2008 18:14:17 GMT
On Thu, 31 Jul 2008 13:29:51 +0200, Andrea Francia
<andrea.francia@xxxxxxxxxxxxxxxxxxèdatogliereohohoho.it> wrote, quoted
or indirectly quoted someone who said :
The verb is "Returns a string"
It is a little verbose.
You can't use it as a verb in other contexts. e.g.
// convert the co-ordinates to String format for display.
It would be nice to abbreviate that to something like
// format the co-ordinates
// express the co-ordinates
// present the co-ordinates
// exhibit the co-ordinates
// render the co-ordinates
// flatten the co-ordinates
It might be best to pick a fairly obscure word that has no attendant
ambiguous meanings.
Two related problems:
1. What if you have several toString-style methods. e.g.
toISODateSTring toLocalisedDateString. Should those be called
formatISODate or formatAsISODate? I am a stickler for consistency.
2. How do you do the Javadoc to avoid redundancy
and potential inconsistency. e.g.
/** returns date converted to an ISO date String of the form
YYYY-MM-DD in local time.
@param theDate date you want to display.
@return the date converted to an ISO date String of the form
YYYY-MM-DD
*/
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.
- References:
- Terminolgy: the verb corresponding to "toString"
- From: Roedy Green
- Re: Terminolgy: the verb corresponding to "toString"
- From: Andrea Francia
- Terminolgy: the verb corresponding to "toString"
- Prev by Date: Connecting Via HTTPS
- Next by Date: Re: I'm annoyed
- Previous by thread: Re: Terminolgy: the verb corresponding to "toString"
- Next by thread: Re: Terminolgy: the verb corresponding to "toString"
- Index(es):
Relevant Pages
|