3 ms·
If you really want to remove duplication, try the other way first, like this: where there is // 10 repetitive lines of math write a few helper functions, lik
by kuon 7y ago
If you really want to remove duplication, try the other way first, like this:
where there is
// 10 repetitive lines of math
write a few helper functions, like
// 3 repetitive lines of math calling my helper functions
I don't known what math was in this case, but removing duplication should preferably handled in this direction to avoid introducing more abstraction and in this case keep a full separation of concerns.