3 ms·
That sounds like premature generalisation to me. I'd say use a separate free function when it needs one, which is not the case yet (and might never be.)
by userbinator 10y ago
That sounds like premature generalisation to me.
I'd say use a separate free function when it needs one, which is not the case yet (and might never be.)
- asveikau 10y agoCall it an overreaction to a past project in which a predecessor scattered free calls over several uses, then I had to add fields. I don't mind adding 1 useless function per complex type if it saves me those headaches even a small minority of the time, or for the next maintainer. Opinions may differ, but that's me.
- gpvos 10y agoI think this is more of a maintainability/readability case. Your suggestion sounds like premature optimization to me.