Perhaps it isn’t so good for everything to be an object, or everything to be a file. Different things should be different things. Similarly, it is not exciting to me to intermingle code and data in objects. Sometimes, you want some code that is code, that operates on data that is data. Anthropomorphizing modules so that it’s actually some sort of “agent” that responds to a “message” muddies the waters rather than make things more intuitive.
Object-oriented programming is a set of solutions in search of a problem. We know this because all of the beginner examples are about things that you would never want to program: simulations of zoos with different animals, or philosophical inquiries into what shapes are also what other shapes. Beginner examples in other paradigms at least do useful things. Even beginner examples of functional programming sort lists, or tell you Fibonacci numbers – something you might actually ask a computer to do.
NewsletterFind out via e-mail when I make new posts!