Servergeek
Mickey Williams' weblog


Powered by Blogger Pro™

Wednesday, June 23, 2004

Taking a [Different] Pill


It must be that time of year...

Friday marks my last day as an independent consultant. I'm moving to Neudesic as a Principal Consultant, joining Chris Rolon, Tim Marshall, Curt Peterson, Brian Loesgen, Bryan Baker, and a horde of other server-side over-achievers. It took a lot to dislodge me from the independent consulting lifestyle, but every time I spoke at a conference or attended any sort of .NET event in Orange county, I kept running into other speakers from Neudesic. They're highly skilled, well-spoken, and generally nice guys to interact and work with. Neudesic is working on a number of exciting projects, and I'll be working with BizTalk and other server-side products. Working with a team like the one found at Neudesic will not only make it easier for me to stretch out in a few areas, it will also make it easier for me to have greater community involvement.

I start at Neudesic on July 7th, after a short vacation in Maui.

Multiple Inheritance, Opera Clowns, and the Future of OOA/OOD


What I want to see on a bumper-sticker:
Multiple inheritance doesn't kill systems, bad C++ programmers do

Most of us would agree that the crimes of the few should not become the burden of the many. In the opera I Pagliaci, Canio is a traveling circus clown who kills his wife and her lover after being humiliated by their affair. However, we would not ascribe his behavior to circus clowns in general -- it is easily seen as a trait isolated to a single tragic tenor. Surely if there is room in this world for clowns after Canio, you might think that there is room for multiple inheritance after C++, but sadly, it seems that this is not the case. Indeed, MI has become the third rail of object-oriented programming - touching it risks instant death, or at least flames from the net.

Don't agree? Consider the many areas of research that use different variations of .NET (and often variants of C#). At the recent Pilsen conference, two papers discussed enhancements to C#:

  • SpeC# -- (Rustan Leino) Design by Contract tm for C#
  • C Omega -- (Damien Watkins) Concurrency extensions based on the join calculus (The programming Language Formerly Known as Polyphonic C#)

Further, a cursory google search will turn up a number of projects that involve other .NET languages. The ETH gang is building SCOOP with Rotor, F# is a functional language, Pierre Nallet has a most excellent extendable C# compiler, there are experiments with C++-like const, other luddites people have even tried to add reference counting to the runtime.

And yet, even with all of this activity, there is no serious discussion about adding multiple inheritance to C#. I believe this lack of interest is primarily due to hostility towards MI expressed by the non-academic C# programmer. There is a deep tribal fear of MI that exists in many developers that have never even attempted to truly use multiple inheritance, which is a tragic situation in my opinion.

Why does multiple inheritance get a bad rap? In my opinion, it's because C++ has a very complex implementation of multiple inheritance. The fact is that MI was added to C++ only because a member of the Objective-C tribe announced that it couldn't be done (it's ironic that by succeeding so miserably, the C++ implementation has blackened the name of MI forever). For better or worse, C++ is (was?) the first widely used language that claimed to be object-oriented, leading many people (especially those with no exposure to purer object-oriented languages) to see C++ shortcomings to be the shortcomings of object-oriented languages and systems. This is unfortunate -- after all, the implementation of multiple inheritance in Eiffel is so elegant that no real Eiffel program avoids MI. If MI is considered for the .NET runtime, I certainly hope that the CLR team looks to Eiffel as a model rather than C++.

Yes, adding MI would add some complexity to the language, but Eiffel manages to have MI without complicating single inheritance. Yes, there is a performance cost, but there is no reason why there should be a penalty for single inheritance. And finally, it is not an easy problem to solve -- but we are not in the business of only solving easy problems, are we?

And if you're bashing MI, please separate your arguments against Canio from your arguments against circus performers in general.

References:


Home