3 ms·
I think "often" is an exaggeration, but even if it did work that regularly, what about the times it doesn't? Meanwhile, you're sat in front of a computer. Its
by tom_ 8y ago
I think "often" is an exaggeration, but even if it did work that regularly, what about the times it doesn't?
Meanwhile, you're sat in front of a computer. Its entire job is to keep on top of stuff like this. Why not use it?
- jstimpfle 8y agoBecause it's harder to do it in a complicated formal way than simply do it in the most straightforward way. If a type of mistake happens only very rarely and is typically easy to detect, it's almost certainly not a good idea to worry about it. You pay each time you express something using the more complicated formalism, and each time you work on parts that somehow have to deal with the more complicated artifact, and only every Nth time there is a marginal gain from using it.
- tom_ 8y agoIn the abstract, sure - it's not uncommon for projects to start to become consumed by their own infrastructure. But I've never seen X-macro enum stuff contribute to that. (This does of course presuppose that you really want to be able to always get the string name of an enum values. I've found this to be reliably the case, if only for logging purposes, but I've only got my own experience to go on.)