3 ms·
> HAS_NETWORK / #ifdef HAS_JOURNALD / ... mumbo-jumbo. While But when I had a glance at the project you linked on github, that was basically the first thing I
by jstimpfle 7y ago
> HAS_NETWORK / #ifdef HAS_JOURNALD / ... mumbo-jumbo. While
But when I had a glance at the project you linked on github, that was basically the first thing I found there...
A suggestion that I have there would be to use the linker instead (make different source files based on implemntation / existance of an implementation). This way you can eliminate most of the #ifdefs.
Regarding dependency injection, I don't see a practical difference to just using global variables / global functions, apart from the fact that by convention DI gives you back objects with virtual implementations, which I don't like.
I won't go into the rest of the things you said because we pretty much discussed it all.