3 ms·
I'm all for doing things at compile time rather than run-time but both the syntax and debugability of CPP template metaprogramming suck. I wonder if C++ should
by gerash 6y ago
I'm all for doing things at compile time rather than run-time but both the syntax and debugability of CPP template metaprogramming suck.
I wonder if C++ should pull a Python 3 and clean up the syntax. Given that the transition for Py3 took more than a decade maybe they should do it in small but frequent language upgrades instead.
- adrianN 6y agoC and C++ live on backwards compatibility. There are many decades old codebases that are still being worked on. You can't clean up the syntax if that breaks backwards compatibility, you'd just end up creating a new language instead.
- gerash 6y agoIMO too much backwards compatibility hinders progress. It's obviously not sustainable to be forever backwards compatible all the way to the 70s. I'd say old code bases can simply stick with the older compiler. As for whether it'd be considered a new language or not, it depends. I wouldn't consider Py3 a new language even though it's not backwards compatible.
- sesuximo 6y agoGeneral software tip: don't make a new version if you'll have to maintain the old and the new. It gets annoying real quick. much easier to tell your users to update and be reasonable with the changes I actually don't see a problem keeping the old syntax alive. I do see a problem with new programmers using obsolete constructs
- gpderetta 6y agothe C++ committee is willing to break backward compatibility in isolated areas if it is really worth paying the price, but it will (thankfully) never pull a Python3.