3 ms·
> void* is "the simplest option that comes to mind", but where a template solution is available, safer, and clearer, You're just playing silly semantics with "
by quietbritishjim 5y ago
> void* is "the simplest option that comes to mind", but where a template solution is available, safer, and clearer,
You're just playing silly semantics with "simplest" here. I meant that #define is genuinely the best overall solution to this particular problem, for the reasons I already gave. Whereas in void* vs templates, templates are genuinely the best overall solution.
- knorker 5y ago#define makes things worse in almost all cases. It's extremely rare to see it done right, as opposed to just being the path of least resistance, that builds up tech debt where things break in hilarious ways. I have seen many many well-intentioned "but surely this time it's the best solution", where no, it's just a time bomb.