Wording improvements for String.indexOf, String.lastIndexOf
uncle.alice at gmail.com
Mon Apr 19 10:23:48 UTC 2010
On Thu, Apr 1, 2010 at 3:36 PM, Martin Buchholz <martinrb at google.com> wrote:
> On Thu, Apr 1, 2010 at 14:35, Xueming Shen <xueming.shen at oracle.com> wrote:
>> Seems like the "is <code>true</code>." line is missing from the new wording
>> all cases), is it purposely? Not a native, but I would assume we still need
>> those 2 words to make the sentence complete.
> It is true that "is true"
> would make it a grammatically complete sentence,
> but I think it's best to not be quite that pedantic and lawyerly.
> In general, the JDK makes a pretty good compromise between
> precision and readability.
I think Sherman has a good point, except the wording should be
"returns true" instead of "is true" (with, of course, "true" formatted
to indicate that it's a boolean literal, not an English word). That
would make it consistent with methods that return other-than-boolean
values, as well as being considerate of non-native English speakers
who see a method name like "startsWith" and _don't_ automatically read
it as the English phrase "starts with".
More information about the core-libs-dev