4 ms·
The choice between 'portability' and 'ifdefs' is a false dichotomy. There are far cleaner ways to achieve portability, and ifdefs are almost always a sign of 'd
by msbarnett 13y ago
The choice between 'portability' and 'ifdefs' is a false dichotomy. There are far cleaner ways to achieve portability, and ifdefs are almost always a sign of 'doing it wrong'.
See, for example, Kernighan and Pike talking about portability in The Practice of Programming.
- bkor 13y agoBSD doesn't support a bunch of stuff. How would you deal with that concretely. How would you ensure that all those different code paths are tested?
- anonyfuss 13y ago> BSD doesn't support a bunch of stuff. How would you deal with that concretely. How would you ensure that all those different code paths are tested? You could start by explaining "a bunch of stuff" -- and why it's necessary -- concretely.
- npsimons 13y agoCode coverage tools are available. Porting software to other platforms is just one crude, but very effective way of testing different code paths, some you can't even see (unless you are in the habit of stopping at each compile stage and checking things such as the compiler's assembler output . . . ).