forgottenserver
forgottenserver copied to clipboard
Move Events methods to namespace
Pull Request Prelude
- [x] I have followed proper The Forgotten Server code styling.
- [x] I have read and understood the contribution guidelines before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
Changes Proposed
- Move Events methods to namespace.
@ranisalt to what extent is it good to use namespace to handle all singletons? I personally like namespaces, but is it in its main function? Anyway, I can't think of any other idea.
to what extent is it good to use namespace to handle all singletons?
Singletons are ~almost~ always a bad idea. Namespaces are an enhanced private section in a class, since you hide the implementation details and the compiler can assume it's not visible and perform more aggressive optimizations.
I like this post on how singletons are an awful idea in general. Namespaces don't solve it, but they make it less bad.