|
|
|
|
|
by mehrdadn
2897 days ago
|
|
Well I had a response to that originally but his edits kind of changed how much sense my reply made in response. Here's what I had: Performance is only one aspect of it. It also reduces code bloat, reducing the program's size footprint. Most tests (yes, I know, not all, but most) should not make it into the final binary users are running. I also don't see what's "hacky" about making a foo.test.cc file when I want an alternate implementation for foo.cc. It seems to be quite a positive and clear way to document the fact that an implementation is only needed for testing, and vice-versa. And not only that, but it reduces compile (& link) times, since you only need to compile one of the two implementations for each use case. |
|
Unfortunately a lot of C++ developers don't really understand how the linker works, and because of that the build system is black magic.