Comment

Comment by com2kid

> All of these sound weird to me—most non-stupid (hello 802.2) protocols and hardware are going to have natural-aligned structure fields, so basically any mainstream (8-bit-byte, two’s complement, etc.) ABI is going to lay them out the same way, packed or not.

In the long ago year of 2015 I worked on a project where the same binary packet was:

1. Generated by an 8 bit micro controller

2. Consumed by a 32bit Cortex M3

3. Passed onto iPhones, Androids, Windows Phones, and Windows PCs running ObjC, Java, C#, and C++ respectively

4. Uploaded to a cloud provider

The phrase "natural aligned" has no meaning in that context.

parent com2kid 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton