Ah, it’s been an intense week for me, doing some hardcore code slinging, trying to get our product to alpha state. I am just too clever for my own good, I think. I spend too much time saying, “you know, if I just moved this over here and slapped an abstraction in over there, it would be so cool!”. I also like to touch compilers in inappropriate ways, which usually leads to trouble.
For instance, part of the work involves worknig with intervals. I have a template class that converts a class with certain numeric properties (the metric) into an interval class. The question was, can the interval template compute a maximal interval (one that contains all values of the base metric class)? One option was to use
std::numeric_limits and the other to use static class members named
MAX. Naturally, I tweaked up the template to detect this at compile time to avoid the issue (each metric can do as it likes, and the builtin integral types work without any additional effort).
I have to say, though, that the Dark Empire’s current development environment (DevStudio 2005) shows a lot of improvement in the compiler and intelligence of the debugger. I know people rave about Linux, gcc, and Eclipse but they’re just not in the same league. For instance, SWIPIAW doesn’t like me to use certain STL algorithms (like
for_each) because they are impossible to debug on Linux. Even if I were building Linux only applications, I would still do the primary development on a Win32 platform and then port.