2 ms·
> Small, appropriately scoped structs are ok. Indeed. Structs are specific, self is "the whole shebang". And while (annoyingly) explicit in Python, it is commo
by cies 9y ago
> Small, appropriately scoped structs are ok.
Indeed. Structs are specific, self is "the whole shebang". And while (annoyingly) explicit in Python, it is common and OO-practice to pass self to all non-static members, thus defacto the self is mostly there. Writing member methods as static (or class methods, as called in Ruby land), is a great way to make code a bit more "functional".
At some point you simply do not use self anymore and the class is merely a namespace with some unused features.