3 ms·
I agree with his suggestion that most code manipulating byte order is incorrect or unneeded. Within your application's logic, everything should already be unif
by mrmekon 15y ago
I agree with his suggestion that most code manipulating byte order is incorrect or unneeded. Within your application's logic, everything should already be uniform.
I agree slightly less with "computer's byte order doesn't matter", differentiated from peripheral and data stream byte order... that's the same friggin thing. It matters that you treat your inputs and outputs correctly, and how you do that depends on your computer's byte order, so they computer's byte order does matter. Just not so much during the data processing stage.
But mostly, I'm just saddened that every post about C now has a "only people who do [X thing that requires C] do that, and you're probably not one of them, so you should do that!" Maybe there's just a huge disconnect between people-who-blog and people-who-write-low-level-code, but most of the software guys I know have worked professionally on microcontrollers, DSPs, operating systems, or compilers within the last 5 years, and I'm working on a compiler for a DSP right now (and I expect byte-order to matter).
- pavpanchekha 15y agoIn this case, the person-who-blogs is, I believe, Rob Pike, one of the original Bell Labs & Plan 9 pioneers. I think there's not much of a disconnect.
- oh_sigh 15y agoNo offense brother, but Rob Pike shits all over you and any of your "software guys". The man is a living legend. This is not to say that he can't be wrong, but to call him just a "person who blogs" only shows how little you know.
- jobu 15y agoThe only code I've used lately that cares about endian is SQLite (http://www.sqlite.org/search?q=endian http://www.sqlite.org/search?q=endian) Also, it's been 5 years since I had to deal with it, but I remember endian mattered for some image file formats, and also for blitting to the screen for Mac vs PC.