Object-Oriented Programming is Bad
Brian WillYouTube ↗
Further reading 2
What makes an object useful? →Compare refactoring a pricing rule into small objects with the cost of coordinating objects that carry mutable state. A class boundary alone says little about how its users interact.Why don’t two locked objects make a safe transaction? →Compare what each lock protects with what the combined operation requires. This is a cost of coordinating shared mutable state, not a claim that every lock is wrong.
Caption notes
Will argues that coupling behavior to small data types can scatter changes across a program and explores plain data, procedures and larger module boundaries.
Original passages · 6
as soon as you have objects being shared encapsulation just flies out the windowthey exist simply as attacks to conform to this ideology about code modularizationare we actually decreasing the total complexity of our program or just displacing the complexitythe brilliant thing about pure functions is that they're the only truly self-contained unit of codethe problem is really not classes per seassociation between certain functions and certain data types