logoalt Hacker News

titzertoday at 11:51 AM2 repliesview on HN

People are going to come out of the woodwork to argue about OO specifically, and I'd probably join in, but the higher-level view that I've come to over the years is that one programming paradigm is not the best in all situations. It really helps to work on a lot of different systems that are not all in the same class and look at a lot of code written by people of all skill levels. It's not possible to really talk about all programs, but I will say that the OO way of thinking can very easily be overdone and end up a giant mess. Similarly, the FP way of thinking can also be very easily be overdone and end up a giant mess. The old-style procedural programming (C with a pile of global variables) can easily be overdone and end up a giant mess. Yet all three of those can actually work out great at the right scale on the right problem!

I think the problem is that we can't really architect a program well until after it works and fulfills all of its design requirements. Those are usually in flux and then we have to engineer dimensions of extensibility to prevent committing to the wrong architecture in the beginning. Those extra dimensions of extensibility come at some cost too, as they often mean indirection and cognitive overhead.

We often don't write the same program twice, or even three times, unless it's a really important program or a we just like doing it. Contrast to other fields, e.g. building houses, where we have lots and lots of examples of how to do it and they started to form archetypes. We try to call those design patterns in programming, but they're actually pretty vague and low-level. Can you imagine going to build a house and thinking "yeah, I think I need to use the wood-and-nails design pattern here, and I think I'll do rafters-and-shingles there, with some brick-and-mortar there." Yeah, real specific ideas on how to do it.


Replies

21asdffdsa12today at 12:06 PM

I think the underlying error - is the assumption that everyones model is going to be equal when looking on the world, as a world of objects. That holds up- for a surprisingly small number of objects we all interact with.

Then it breaks down- depending on how deep your abstraction level goes (A car has 4 tires. 4 tires are made of: xyz). It also breaks down, with the abstraction in the real world above the modeler. Some think in organization, some in physics, some in tribalist constructs, some imagine a god object above them some don't. It was communicated as a tool using "shared" state as a communication helper.

But we do not share as much state as expected.

Folcontoday at 12:03 PM

I actually do wonder whether we're going to see more of a prevalence of people building one off software due to an increasing use of LLM's which makes the house building model you're describing more common in software