Adding appendHex method to StringBuilder

Mark Reinhold mark.reinhold at oracle.com
Mon Oct 2 12:18:57 UTC 2023


2023/10/2 7:22:55 -0400, claes.redestad at oracle.com:
> I think this goes against the grain: StringBuilder is a simple builder
> for non-localized unformatted output. For formatted output there’s
> Formatter, String.format and, with JEP 430[1], FMT."..." to help output
> string data in more advanced, formatted and localized ways.

Agreed.

If we were to introduce a `fooBar(x)` method for every common
`foo(bar(x))` expression in the JDK code base then our APIs
would fast become inscrutable.

- Mark


More information about the core-libs-dev mailing list