forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

Move Events methods to namespace

Open ramon-bernardo opened this issue 1 year ago • 2 comments

Pull Request Prelude

Changes Proposed

  • Move Events methods to namespace.

ramon-bernardo avatar May 19 '24 18:05 ramon-bernardo

@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.

MillhioreBT avatar May 21 '24 22:05 MillhioreBT

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.

ranisalt avatar May 26 '24 19:05 ranisalt