On Fri, Dec 28, 2007 at 10:16:08AM -0500, Gary Baluha wrote: > I'm also not sold on the concept of object oriented programming in general. > Along the lines of "nothing is impossible with enough layers of > indirection", I think too much abstraction also removes the programmer from > what he/she is actually doing. OOP is a nice concept on paper, until you > realize that most large programming projects are not written by a single > person, and most people will not be coding the entire tree of abstraction > they are using. This leads to errors that may be very difficult (if not > impossible) to fully track down.
If you are using OpenBSD, you're probably using pkg_add(1) and friends. Those tools would be completely impossible to write without a fully OOP approach. Tracking bugs through them is reasonable, even though there ARE indeed layers and layers of indirection in the PackageRepository code... The level of code sharing is at least two orders of magnitude better than I could ever achieve with traditional C. Considering the complexity of what the code does, there are surprisingly few bugs that show up in it. But, of course, there are good designs and bad designs, and this does not really depend on the OO nature of the design at all. You can write obfuscated code in a procedural design, or clean code in an OO design.