RFR: 8365606: Container code should not be using jlong/julong [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Mon Nov 17 17:34:04 UTC 2025
On Mon, 27 Oct 2025 09:17:02 GMT, Andrew Haley <aph at openjdk.org> wrote:
>>> > I agree. Its not pretty, but consistent with what we did elsewhere. Nobody wants to do that discussion again.
>>>
>>> Sorry, I was unaware of any previous discussion. I was suggesting a less impactful way to make the change, taking advantage of the recent adoption of C++17, which allows for cleaner code. But I won't stand in the way of consensus.
>>
>> FWIW, I'd be interested in seeing a small example of what that would look like with C++17. There were a lot of discussion about the style, but it wasn't because we wanted to figure out the color of the bike shed but rather how to write safer code that makes it less likely to accidentally introduce bugs because of type conflation.
>
>> it wasn't because we wanted to figure out the color of the bike shed but rather how to write safer code that makes it less likely to accidentally introduce bugs because of type conflation.
>
> This. A function that returns its value as a side effect on a reference parameter is (at best) a code smell.
@theRealAph @stefank OK to integrate this?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27743#issuecomment-3543074389
More information about the hotspot-jfr-dev
mailing list