3 ms·
>line-by-line in c++ I don't understand how/why people do this? the languages are so different I can't imagine doing it - libraries, control structures, types!
by mlevental 9y ago
>line-by-line in c++
I don't understand how/why people do this? the languages are so different I can't imagine doing it - libraries, control structures, types! what exactly are you prototyping then? just the shape of the code?
- aabajian 9y agoYou use black-box unit tests developed against the Python code. You then write identical code in C++ that produces the same output (i.e. passes the unit tests). Then you apply optimizations/refactoring specific to C++. It is the latter - premature optimization - that is a pain in lower-level languages like C++, and which stops you from getting the correct result.
- mlevental 9y ago>You use black-box unit tests developed against the Python code. man that makes even less sense to me. do you have an example of code produced this way?