[foreign-memaccess+abi] RFR: 8291639: Improve the ability to visualize a MemorySegment in human readable forms [v4]

Per-Åke Minborg duke at openjdk.org
Thu Aug 4 13:02:20 UTC 2022


On Thu, 4 Aug 2022 09:55:47 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> Possible questions: why are address values represented as toString? Or numbers in decimal form? What if I want hex form? This is the part that makes me uncomfortable about this method: in a way, you almost want it to generate some kind of XML or json schema - and then leave the toString mapping to the user - but this method is doing everything, so it has to make opinionated choices at every step of the way, and I can see how some of those choices would be good for some and bad for others.

I think, that once we have the Data Oriented Programming pattern in place, users can easily roll their own renderers and this renderer would only provide reasonable defaults. I think addresses should be rendered in hex form by default as suggested.

-------------

PR: https://git.openjdk.org/panama-foreign/pull/695


More information about the panama-dev mailing list