Re:Modern C++: 7 Ways to Fake It Until You Have It
by laythea on Tuesday September 04, 2018 @04:09AM
(#17907418)
I would argue that sprinkling your C++ version X code with equivalent C++ version Y code commented out is an indication that you may have too much time on your hands :)
Seriously though, in my opinion, it makes the code horrible to read. Comments were invented to provide a programmer to programmer communication method. Stick with 1 C++ version (even that is a lot!). Migrate code slowly or not at all (there is very rarely a solid justification to rewrite working production code), and remember anything you rewrite will need fully tested (and you may still miss some edge cases). Your fellow programmer and team will thank you.
Seriously though, in my opinion, it makes the code horrible to read. Comments were invented to provide a programmer to programmer communication method. Stick with 1 C++ version (even that is a lot!). Migrate code slowly or not at all (there is very rarely a solid justification to rewrite working production code), and remember anything you rewrite will need fully tested (and you may still miss some edge cases). Your fellow programmer and team will thank you.