[vector] Add non-masked Vector. intoByteArray accepting a byte order

John Rose john.r.rose at oracle.com
Wed May 6 17:25:50 UTC 2020


On May 6, 2020, at 8:11 AM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> 
> Perhaps rather than filling out we need to slim down. where ByteOrder is a required parameter, then that fits with the pattern of non-mask and mask variants of many other methods:
> 
>  public abstract void intoByteArray(byte[] a, int offset, ByteOrder bo);
>  public abstract void intoByteArray(byte[] a, int offset, ByteOrder bo, VectorMask<E> m);
> 
> And, we do the same for [EType]Vector.fromByteArray.

That’s not terrible.  After all, if you are working with byte arrays,
you really do need to pay attention to byte order; it doesn’t just
sweep itself under the rug and go away.  (Trying to pretend byte
order doesn’t exist leads to a special code smell I call byte odor.)

— John


More information about the panama-dev mailing list