kjwcode: *sigh* (phoebe sigh)
[personal profile] kjwcode
The subject of today's fooling about was hton?() and ntoh?(). Probably more C than C++ there, and much more reading than playing with code, to be honest. Mostly, I spent time rolling the concept that that family of function is "not portable" around in my head. I'm trying to decide if the pedants are coming out to play on that one ("but it won't work on a 36-bit VAX running BSD 4.2 with patch..."), if the concept of switching natural host order to MSB (or simply doing nothing if it's already MSB) is more difficult than I give it credit for, or whether I just don't understand the thrust of that argument. I'm going to guess at the latter.

For all I can tell right now, it seems like people just want another excuse to write their own routine that does exactly the same thing to show how clever they are, or possibly to avoid getting real work done. I think it akin to writing one's own string class for no better reason than you're convinced you can do better than whatever STL implementation you use. In turn, I liken that to hand-tweaking the assembly output of your compiler because you think you can do better (excess hubris, rather than the rare times where it actually makes sense). It's one of those urges I've outgrown, thankfully.


kjwcode: Bella, the little silly dog. (Default)

February 2012

192021 22232425

Most Popular Tags

Style Credit

Page generated 26 September 2017 09:19
Powered by Dreamwidth Studios