logoalt Hacker News

Retr0idyesterday at 3:03 PM2 repliesview on HN

I value correct code for purely selfish reasons. The most likely person to try to run my code on a BE system is me.


Replies

Retr0idyesterday at 4:26 PM

Also, endian-correct code is usually semantically clearer. For example, if you're reading network-ordered bytes into an int, an unconditional endian swap (which will produce correct results on LE systems but not BE) is less clear than invoking a "network bytes to u32" helper.

eesmithyesterday at 3:27 PM

There are a lot of odd (by modern standards) machines out there.

You're also the most likely person to try to run your code on an 18 bit machine.

show 1 reply