RFR [8054221] StringJoiner imlementation optimization

Martin Buchholz martinrb at google.com
Tue Aug 5 19:33:42 UTC 2014


On Tue, Aug 5, 2014 at 6:45 AM, roger riggs <roger.riggs at oracle.com> wrote:

> Hi,
>
> Don't get too carried away on adding convience methods,  last year when
> StringJoiner
> was proposed, there was quite a bit of tension between enough and too much.
>

StringJoiner is certainly funky.
I'm not sure what the perfect string joining API is, but StringJoiner
probably isn't it.


> Don't add to the size and maintenance of the JDK without a clear use case
> and knowledge that the APIs will be used frequently.


String repetition is  quite popular - in perl, it has its own operator
("x") !
I see thousands of uses of Strings.repeat here at Google.



More information about the core-libs-dev mailing list