2 ms·
Because if everything is a class, then nothing is a class! These are definitely pet peeves of mine: (1) Classes used as pure namespaces. Just use a module.
by chubot 9y ago
Because if everything is a class, then nothing is a class! These are definitely pet peeves of mine:
(1) Classes used as pure namespaces. Just use a module. Modules are namespaces. You can have auto-complete on names in modules.
(2) Methods that don't use 'self'. These should be free functions.
However I don't think he's arguing that classes should be used solely as namespaces. Using OOP does seem to reduce the number of global names in a language though.