[foreign-memaccess+abi] RFR: 8291826: Rework MemoryLayout Sealed Hierarchy [v5]
Paul Sandoz
psandoz at openjdk.org
Fri Aug 19 17:10:03 UTC 2022
On Fri, 19 Aug 2022 09:05:28 GMT, Per Minborg <duke at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/GroupLayout.java line 59:
>>
>>> 57: * {@return {@code true}, if this group layout is a struct layout}
>>> 58: */
>>> 59: boolean isStruct();
>>
>> If we are going to lean into pattern matching then the mutually exclusive methods `isStruct` and `isUnion` are not necessary. Perhaps a change to consider this refactoring.
>
> I totally agree. This also applies to `isPadding()`. I was a bit unsure whether or not this change should be in this PR or a separate one. Since it is changing the API, my initial thought was to introduce this in a separate PR. What is your opinion on this?
I meant to say "Perhaps a change to consider *after* this refactoring" i.e. lets consider such changes in subsequent PRs.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/710
More information about the panama-dev
mailing list