4 ms·
lol, yes. But I have to admit, the dynamic properties of objects make them much more versatile than namespaces or modules. If I would use them only as namespa
by k__ 12y ago
lol, yes.
But I have to admit, the dynamic properties of objects make them much more versatile than namespaces or modules.
If I would use them only as namespaces, by defining every of my (stateless) methods static, they would work exactly as a namespace. But when they're bound to an object instead, I can switch out implementation details easily when needed. So I would consider classes and their objects to be a more powerful version of namespaces.