3 ms·
> A "'C' with classes" approach is probably a good one - but I'd hate to find some subtle template or Boost bug in mid flight... I'm not sure how much benefit
by rat87 10y ago
> A "'C' with classes" approach is probably a good one - but I'd hate to find some subtle template or Boost bug in mid flight...
I'm not sure how much benefit that would bring, especially since dynamic dispatch is probably not encouraged. As for templates I'm not much of a c++ guy but wouldn't most template errors exist at compile time?
- albinofrenchy 10y agoTemplates are mostly problems at compile time, but it's also possible to have subtle issues with complicated template specializations where it doesn't call the function you expect. So complicated usages are discouraged, BUT simple ones that give code reuse with strong typing are great advantages over c in most cases. I think dynamic dispatch would be more permissible than you might think. You end up doing it in c manually in complicated code bases, might as well let the compiler dou the heavy lifting.
- ArkyBeagle 10y agoI'm not thinking of any specific pathology. It's just been my experience that with templates, there is always some risk of harder to catch errors. If it's explicit in 'C'/C++ , its just explicit and nobody's making any assumptions.