2 ms·
I may be missing something, but free functions + namespaces do namespacing better than classes with static methods, no?
by lionkor 4y ago
I may be missing something, but free functions + namespaces do namespacing better than classes with static methods, no?
- cudgy 4y agoAssuming there is no state shared between them, they are basically equivalent in function. Perhaps there is an advantage to namespaces regarding call overhead but that would be implementation dependent. Some languages do not provide namespaces but do provide classes, so static methods are all that is available.