npub1de…nthv4 on Nostr: Also OOP is overrated. Some of the concepts are useful but the way traditional ...
Also OOP is overrated. Some of the concepts are useful but the way traditional languages implement objects is inflexible (can't implement an interface/abstract class for non-class types) and the idea of inheritance has problems around leaking internal details and comprehension.
Composition is much better than inheritance. The only problem with composition is if you want to delegate many things it gets annoying. This is not very frequent problem though and can be worked around using macros.
Published at
2025-02-01 07:36:22Event JSON
{
"id": "72e1c336469809467da512ed9207efaa2ee1eb8cb8d1e2c1105271b846298d1c",
"pubkey": "6e77f4f3c9995e0887d02dc95b39692f58641ed5b073972ef86cd6b61ecc6bae",
"created_at": 1738395382,
"kind": 1,
"tags": [
[
"e",
"0e4738d9391681f4dfb7ca104800c5e5e174ee1bcae2bf36c136b1445acb839e",
"",
"root"
],
[
"e",
"6d72f07fe04275654fc3d738df51444b221414fde76d5fc21980bd4b4256e909"
],
[
"e",
"e201d3bd321c9f17c4d9e91002bd258f453175f5900f3e8b096fe8840e587dd6",
"",
"reply"
],
[
"p",
"3dda45008a0391d7933e1ae7cc3b844bfd91c92ddefd0f55ce6afd025776f2db"
],
[
"p",
"c5e173798dad29dd2b8062b8310974aed0a72e3645f9e58d2129bc6abd15d8bf"
]
],
"content": "Also OOP is overrated. Some of the concepts are useful but the way traditional languages implement objects is inflexible (can't implement an interface/abstract class for non-class types) and the idea of inheritance has problems around leaking internal details and comprehension.\n\nComposition is much better than inheritance. The only problem with composition is if you want to delegate many things it gets annoying. This is not very frequent problem though and can be worked around using macros.",
"sig": "047609e9222a9c75735158d5336884a2b1a781c687e27ccddb6ff17ca5ed0be53720f44638f7a60b2128a22ed9c997b8e303636a7ea67aa75df9b614443300c1"
}