RFR: 7903649: Field and global variables of array type should have indexed accessors

Maurizio Cimadamore mcimadamore at openjdk.org
Tue Jan 30 16:17:38 UTC 2024


On Tue, 30 Jan 2024 14:34:27 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> we could settle by having a single extra layout accessor/descriptor accessor per var/field/function

Although, I think I like the idea of exposing multiple related constants under a single umbrella - given that in most cases we generate the holder class anyway. In many cases there seem to be multiple interesting constants for a given symbol - and if we were to expose different constant accessors, the constant accessor would quickly outnumber the _real_ API point, which would then lead us back in a situation of poor API discoverability.

In other words, while reserving the "good name" to the common API points remains a good move, if such good names are buried under several "less than good names", the API quickly becomes bloated, which is still problematic, unfortunately.

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

PR Review Comment: https://git.openjdk.org/jextract/pull/198#discussion_r1471355189


More information about the jextract-dev mailing list