RFR: 7903727: Remove the reliance on String Templates feature [v7]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 5 15:16:12 UTC 2024
On Wed, 5 Jun 2024 11:26:38 GMT, Nizar Benalla <nbenalla at openjdk.org> wrote:
>> This PR aims to replace the usage of string templates with `String::format`, since there will be no string template feature in JDK 23.
>> I tried to keep similar indentation and convert them in-place, to make reviewing the changes easier.
>
> Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision:
>
> - remove whitespace
> - fix doc comment
Looks good. I'm not too sure about readability of some cases e.g. when we have `String.format("%s %s", a, b)` and add indices (even thought parameters are used in order. But (a) we can address this in a separate PR and (b) for bigger snippets one might argue that it's hard to keep rack of the position at which an argument appears, so having the number in there is handy (so my objection only really applies to the small format strings) and (c) maybe the best way to resolve that is to (as suggested otherwise) use some other kind of custom formatting.
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jextract/pull/244#pullrequestreview-2099510164
More information about the jextract-dev
mailing list