Why Objects Suck

Check out Progress 4GL - it lets you access database records and fields from the same language/IDE (etc) as you use to output reports or GUI or whatever. I wouldn’t want to write a compiler with it, but for business apps where 99% of the work involves trundling through the database, I can’t see how the Java/C#'s/Rubys of the world can possibly compete.

Disclaimer: I am not involved with Progress and I hate them in some ways, but I would still rather use them (for business apps).

I would love to hear Martin Fowler, Uncle Bob, or someone of like caliber and experience weigh in on this discussion.

Please revisit topic in light of LINQ to SQL and Visual Studio 2008 (and Entity Framework beta releases). kthx!

are there any non oop languages left apart from C
I bet perl 6 (if it ever ships) will be more oop orientated.

It’s oop, whether you like it or not. Doesn’t seem to stop overruns, bad code, and software disasters though

Heh, you predicted LINQ to SQL.

You don’t understand OOP. Admit it. You have problem creating domain models. Admit it.

I bet Your projects all look like C program with Main function containing all code. Milions of if-s, case-s.

Let’s take example like yours with Customers but with Employees. There are different kinds of them. How do You calculate pay for them? You iterate rows, check flag (column) and then calculate pay based on it? Are you kidding me? What if calculation should base on other tables (timecards, commissions)? You iterate other tables, check if they contain rows for Employee.Id and include them in calculationa? Are You kidding me?

Your database management system should manage your data. It almost seems like that’s the exact purpose they were designed for or something. Maybe that’s why its right there in the name?

The name Database Management System states that it manages the database. If it would manage the data, then the name would be Data Management System.

You don’t understand OOP there is nothing funnier than this statement. The fact that one programmer can justify obvious suckiness by a lack of understanding on the part of another means that there is definitely some kind of hidden deficiency in the paradigm.

Domain models are as the name states models. they were never meant to be autonomous programs.

Just my opinion, after coding in everything form assembly to multiple high level languages, from procedural to OOP style.

I’ve noticed that I can pretty much do 98% any complex problem coding using just arrays (with custom data types).

I’m not saying OOP doesn’t have its place, but its probably not the best tool in every situation.

Re: “Let’s take example like yours with Customers but with Employees. There are different kinds of them. How do You calculate pay for them?”

No, in practice there are NOT different “kinds” of employees. You are thinking in terms of hierarchical taxonomies. Hierarchical taxonomies are poor at modeling most business domains and domain objects. Modeling employees with sets of features or attributes is more realistic and more flexible. But OOP get’s ugly when it tries to handle sets. It’s not designed around sets, but rather physical objects and hierarchical taxonomies or nesting of physical objects.

If you are modeling physical objects, that’s fine, but in the biz domain one is modeling intellectual and conceptual things and relationships such as laws, management decrees, and customer and vendor inter-relationships; not so much physical things. OOP can’t give decent examples of how great it is without resorting to physical analogies. This is a sign of the weakness, the “physical problem”.

An important aspect of software development is being able to manage complexity. We see this everywhere in IT. One example is layered architectures, where higher layers don’t care about how lower layers are doing their work, etc. This is all about managing complexity. Can you imagine how difficult it would be to try and implement TCP/IP without a layered approach? In many business domains, OO programming languages are very good at helping to manage complexity. OO design patterns, when applied appropriately and correctly, can very elegantly solve complex problems, and help developers understand and maintain that underlying complexity. There is a very good reason why OO has become increasingly popular over the years, and why it is now the norm in a countless number of industries.

OO design patterns, when applied appropriately and correctly, can very elegantly solve complex problems

A very true statement, but vague enough to be true of any paradigm. It seems to me that relational, procedural, semantic(www.w3.org/standards/semanticweb), rule-based, pipeline (*nix shell),prototype-based and functional methods of process and data abstraction are all very useful; just like OO. Ideally we would use whichever abstractions (or lack thereof) suited the problem domain best, but we don’t for a few reasons:

  1. It would mean more developer time spent not only learning another language but learning a whole new set of best practices
  2. Integration between langauges is nontrivial (perhaps less so in .NET)
  3. Large tool systems (by which I mean the Java Platform) are OO
  4. Good tools and techniques for modeling are either not as widely developed or are less important because the language is itself the most succint way of modeling a certain style of programming
  5. It is hard to be creative enough to model a problem space in the same way a domain expert would. By the very fact of not being a domain expert we lack the same degree of sophisitication and organization in our mental models.

Ideally I would use simple, extensible languages to model a problem in the most precise and elegant way. Given that it takes a better programmer than myself to do that well, I will continue to rely on ready made abstractions like OO and relational modeling. What is important to look out for is when our abstractions fail us (http://sites.google.com/site/steveyegge2/decision-time) . OO may be effective but it is not the most general or flexible means of modeling. It is represented by Trees or Acyclic Digraphs, whereas the Semantic Web and rule-based programming spans Graph theory in general. Relational algebra depends upon set theory which was considered for a while to be the foundations of mathematics. With category theory (more foundation that set theory) being of interest to language researchers, who knows what more flexible abstractions we might see?

Hi Jeff,

I just stumbled across this blog post now, ten years later, and I was wondering if you still feel the same. I intuitively think there is a lot of validity, but as a non-programmer who likes to write code with coffee for fun before work, I am not aware enough of the current landscape to have a valid opinion. Do Objects Still Suck?

I am reading this for the first time. In 2015. I also would like to know where you stand on this concept now. Currently I’m leaning towards relational database for things like user/address/phone etc and then a second database, an object oriented one for pictures and music etc. Then i’d have to somehow tie all this together. It’s about knowing the right tool for the job and your writings here have got me thinking about the appropriateness of whatever technology I happen to be using for whatever task

+1 for an update on this, or a confirmation…