Post ARUgYfoCMhm7D83leC by njoseph_1@toot.thoughtworks.com
(DIR) More posts by njoseph_1@toot.thoughtworks.com
(DIR) Post #ARUgYfoCMhm7D83leC by njoseph_1@toot.thoughtworks.com
2023-01-10T06:07:26Z
0 likes, 0 repeats
I don't like writing classes in Python. Maybe this is an influence from Clojure. I only use classes as a last resort. Many object-oriented design patterns can be implemented in Python by simply passing functions as arguments (e.g. strategy, template).#Python #Clojure #DesignPatterns #FunctionalProgramming #fp
(DIR) Post #ARUgYgbTPVBrfx77S4 by wolf480pl@mstdn.io
2023-01-10T08:07:36Z
0 likes, 0 repeats
@njoseph_1 as long as the clqsses would only have one method.When you need two methods with sgared state, passing functions as arguments starrs being a pain