[foreign-memaccess] layouts, bits and bytes: call for bikeshed :-)
maurizio.cimadamore at oracle.com
Fri May 15 14:16:05 UTC 2020
currently the MemoryLayout API is defined internally in terms of bits;
this is for a reason, as we want to be able to use layouts for sub-bytes
entities (e.g. bitfields). That said, the API is quite liberal in
allowing the user to interact with it either in bits or bytes. For
instance both layout size and alignment can be retrieved in the
There's an exception to this rule: layout creation. We have two
Which do not provide the corresponding XYZByte overloads.
If we were to add such overloads, the next hurdle would be the set of
constants in MemoryLayouts, where we have e.g.
Perhaps it would make sense to expose these in bytes too as well as
bits, and add:
How do people feel about these changes? Useful? Confusing?
Let's paint this bikeshed :-)
More information about the panama-dev