Bob: I truly don't mean to pick on you here. You brought forward a clear example, which is wonderful, and I'ld like to use it as a way to challenge some of the ideas we are collectively looking at.
On Mon, Mar 22, 2010 at 4:01 AM, <[email protected]> wrote: >> 1. How important is inheritance in the eyes of people here? > > For me, it's a very important property of a programming language. OO, > if done right, seems to naturally fit the way I think. So first, I think this is learned behavior. I'm old enough to personally remember when OO went mainstream, and people thought it was incredibly alien. And with apologies, we should ask whether the "natural fit" indicates a positive property of OO or a negative property of how we are training programmers. When I look at C++ or C#, or Java classes, I see two distinct things: - A "type inheritance" mechanism providing restricted refinement (virtual functions) - An implementation reuse mechanism. The two are mixed together in a somewhat unfortunate way. If "class A" is truly a type, we might expect that there could be two implementations of this type, just as there can be many function implementations that satisfy the type int->int. In C++/C#/Java you can only do this by further extending the type, so types and implementations are hopelessly mingled. If we separate class type definitions from class implementation definitions, then we no longer have a conventional OO language. But we can still represent all of the OO patterns in the language that we *do* have. shap _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
