With circuit design you have OR gates and AND gates and NOT gates. However you can program everything with only NAND gates because with that gate you can express all other gates.
Ultimately though using universal NAND gates is a convenience of manufacturing and not comprehension. Just imagine if we replace all of our Boolean operators with an equivalent NAND and then only use that. Probably not the most readable code.
OOP has one trick: dynamic dispatch. Which corresponds to logical existential operator.
You could also have product (structures ... depending on if you consider getters and setters proper OO then maybe it has this), sum (sum types and discriminated unions), implication (anon functions), and universal (generics).
Yeah technically you can simulate everything with dynamic dispatch but then you kind of end up with a mess.
Ultimately though using universal NAND gates is a convenience of manufacturing and not comprehension. Just imagine if we replace all of our Boolean operators with an equivalent NAND and then only use that. Probably not the most readable code.
OOP has one trick: dynamic dispatch. Which corresponds to logical existential operator.
You could also have product (structures ... depending on if you consider getters and setters proper OO then maybe it has this), sum (sum types and discriminated unions), implication (anon functions), and universal (generics).
Yeah technically you can simulate everything with dynamic dispatch but then you kind of end up with a mess.