offset---cyan on Nostr: npub1fzx00…wt6h3 I can try. OOP brings a huge focus on extensibility and ...
npub1fzx00c36ny4whyuhg4ykx6987wxp885fmwmc784n27qcu6pavwzs3wt6h3 (npub1fzx…t6h3) I can try. OOP brings a huge focus on extensibility and encapsulation, but implementations generally bring interfaces too strict and class definitions too small to be helpful to the programmer in anything except the initial final example; inheritance trees and strangely compartmentalised code. Of course there's also the imperative encapsulation of mutable state, encouraged by OOP "design patterns", obscured by implementation. Those are my two preferred criticisms of OOP - extensibility is a pointless goal (just write the code) and never works because of the design patterns OOP projects tend to use.
Not to say all OOP projects are like this, or that OOP doesn't have applications or good implementations - python's single-inheritance, low bs classes lead to some well-designed class boundaries, and Go etc use interfaces to great effect; but nothing can be as straightforward and operable as a data-focused approach with well-designed functions and preferably types.
Not to say all OOP projects are like this, or that OOP doesn't have applications or good implementations - python's single-inheritance, low bs classes lead to some well-designed class boundaries, and Go etc use interfaces to great effect; but nothing can be as straightforward and operable as a data-focused approach with well-designed functions and preferably types.