> From: Robin Jarry [mailto:rja...@redhat.com]
> 
> Morten Brørup, Aug 22, 2024 at 17:13:

> > Maybe the 'a' field in the DPDK IPv6 address structure should be named
> 'b' for "byte" instead, to prepare it for adding a union with a 'w' (for
> "word") field if we want to introduce 2-byte alignment.
> 
> My idea was to name the field a16 instead of w which would be confusing.
> Also, how would you name a 32 bit array field if it presented itself?

Good question, I have no obvious suggestion for this.
Which again goes to show that naming is hard.

Perhaps we should lean on the names of types and functions using 32 for 32 bit 
versions and 64 for 64 bit variants. Then the union fields could be named 
a8[16], a16[8] and a32[4].

Other projects follow a convention of including the type in the 
variable/parameter names, e.g. the Win32 API. But DPDK doesn't, so it seems 
strange doing it here.

Reply via email to