logoalt Hacker News

pjc50yesterday at 9:23 AM2 repliesview on HN

Sure, if your structure doesn't contain any pointers and you only ever want to support one endianness and you trust your compiler to fix the machine layout of the struct forever.


Replies

zadikianyesterday at 8:13 PM

Mainly the first thing. If your struct is already serial, of course serialization will be easy.

userbinatoryesterday at 8:28 PM

...which is true for 99.999% of the time anyway, so it's not worth worrying about.