there seems to be this common junior-to-midlevel programmer thing where they got confused once by static vs. instance methods so they decided that static methods are MORALLY WRONG and we have to do (new Foo()).bar() for everything even if it has zero interaction with object state
-
-
correct me if i'm wrong but to me the entire point of OOP abstractions is to reduce verbosity by grouping "impure"/"inelegant" styles of data sets/operations within easy-use constructs
-
i mean that sounds plausible, i plause the hell out of it
End of conversation
New conversation -
-
-
But... in python... the class is an object, so...
-
it's nice of Python to give people a safe space where the bad static methods can't hurt them
End of conversation
New conversation -
-
-
don't make me dig up that PR chaos!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Only a problem if you need the method to be in an instance so you can switch strategy at run time. But then, of course, you have those who will expect that will be needed every time. The problems always arise from the wizards that never really understood how the magic works.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
tbf if you've got a language with a better way of namespacing functions, you should use that but if classes are the only way you can namespace, then namespace away
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.