RFR: 8344942: Template-Based Testing Framework [v9]
Emanuel Peter
epeter at openjdk.org
Mon May 12 09:50:36 UTC 2025
On Wed, 7 May 2025 20:46:37 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
>> Honestly, I don't yet have a clear answer for this. Hmm.
>> I'm not sure this is the best place to give this guidance.
>>
>> I guess the difference is to use a separate "token" vs a hashtag replacement.
>> - token: can paste anything. But it requires you to interrupt the string and add commas. That can be a little clunky. And: you can only do a recursive Template call with the token method.
>> - hashtag: you need it captured as string, either by a template argument or `let`. Does not allow recursive template calls. But it looks a little nicer cosmetically.
>>
>> Is this somewhat helpful? Maybe I can put that somewhere later in the tutorial? What do you think?
>
> Maybe my guidance would be to prefer hashtag, if need be with a `let`. Especially if it is about inserting something on the same line.
> If it is on a new line, then the token method looks nicer often. For example if you stream over a list.
> And recursive Template calls just have to be "tokens".

I added this section here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2084285448
More information about the hotspot-compiler-dev
mailing list