I recently told this story to M. David, who got a kick out of it and just had to blog some of it.
One of my favorite parts of conferences is hanging out with my ‘net friends, and getting into some deep conversations about topics that make normal folks just wonder what planet we are from (I call them the “scaring the straights” discussions, which is a phrase borrowed from the great movie Stripes). TechEd 2005 was no different then any of the previous events, just a little more memorable. After one of the Birds Of A Feather nights, while walking from the convention center to the Peabody Hotel, to have dinner and/or drinks with Mark Fussell and a couple other Xml guys, Christoph and I got to talking about Object/Relational and Object/Xml Impedance Mismatch and all the problems we have with it. The most obvious thing about Object/Relational and Object/Xml Impedance Mismatch is that they both are focused around getting things to or from Objects. Christoph does a lot of work with Web Services, and it seemed to him that in a lot of cases, the objects were pretty extraneous items in the whole scheme of things (not all the time, but in a lot of the cases he was seeing). I agreed with him to some degree, but extended his idea by stating that the problem isn’t with really with Object Oriented Programming, but with the fact that it seems like everything is trying to force OOP onto all programmers, and that is where I see the a problem.
IMHO, the majority of programmers out there can not (and should not) be OO programmers. This is from a guy who thinks DataSets are evil, which should shock some folks. Well if the majority of coders shouldn’t use DataSets or OO, what should they be using? My answer is Domain Specific Languages but not in the more traditional sense that Fowler describes. I’m not looking to morph a general purpose language into a DSL, but use more XML based languages (but it doesn’t always have to be an XML based language, only when the language is predominately hierarchical). We have tried many different paradigms to solve the steep learning curve that is the world of a developer. We have had lots of success with procedural programming, (things like COBOL, BASIC, Java and C++), to create dlls, object models, APIs, components, but we have never attained the orders of magnitude increase in efficiencies that is require to take our world to the next level. It seems as though developing computer systems is the thing preventing us from really entering the “computer age”. It almost feels like the beginning of the Industrial Revolution, when the steam engine was the thing holding us back from the true potential of the Industrial Revolution. Trying to teach the average programmer (aka the mort) to code in a OO style seems like a waste of resources, especially considering how easily (relatively) people learn the very DSL-like HTML (well DSL-like in the way I'm thinking about it).
It was at this point in the conversation that we where nearing the Peabody, and we decide to shelve the conversation and continue it over dinner and drinks with Mark. We meet up with Mark, John Bristowe and a couple others that I can’t remember at this time, and decided to have dinner in one of the nicer restaurants in the Peabody (we had already hit the diner in the hotel a couple times previously). We sit down for dinner, and Christoph and I are about to start up the conversation again, when someone comes up to our table and asks Mark if we mind if he joins us. I look up, and had to do a double take. No, it couldn’t be. Yes, it was. It was Anders Hejlsberg, father of C#, Delphi and Turbo Pascal. I looked at Christoph, giving him the “you go first” look, and he return with the “no, you go first” look. Now, I don’t mind talking about deep stuff like this, stuff that is really way over my head with my friends, but to try to talk about it with a guy who forgot more about programming languages than I’ll ever learn, well, I decided to take a pass. Afterwards, we got to talk to Mark about the ideas, and why we didn’t bring it up, and he scolded us, and said Anders would have probably loved to talk about it. With the whispers we are hearing about C# 3.0 (which will be announced at the PDC 05), I do kick myself when I think about it now.
Side Note: The singer of the Van Halen cover band The Atomic Punks, Ralph Saenz once bumped into Edward Van Halen while in line at a LA Staples store, introduces himself, but doesn’t ask to jam with him. I now know how Ralph felt. DOH!
So, like the title says, Is Object Oriented Programming the Problem, or am I off on some crazy tangent? I’d like to hear what others have to say.