Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: stop using "namespace" classes #2425

Open
dcermak opened this issue Jan 10, 2024 · 0 comments
Open

Proposal: stop using "namespace" classes #2425

dcermak opened this issue Jan 10, 2024 · 0 comments

Comments

@dcermak
Copy link
Collaborator

dcermak commented Jan 10, 2024

Problem description

We are using quite a few "namespace only" classes like, e.g. the Privileges class:

class Privileges:

To be frankly honest, the class serves no purpose except to provide yet another namespace. It feels like a weird relic from C++/Java days where static only classes were a thing.

Given that we are taking the liberty to break things with kiwi-10, I would propose we stop using these and just make these free functions. Python has great support for namespaces, so this would make the code more pythonic. However, since this is a change without any real benefit and just because, I definitely don't insist on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant