> 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. And a good programming language is one that bridges the gap between telling the computer what to do and concisely telling the human reader what's going on.
Take, for example, the task of making fruit salad. I have a little recipe in my head that involves cutting fruit into pieces, adding raisins, lime juice and rum, mixing it all and letting it rest for an hour in the fridge. Obviously, that's a generic algorithm written using abstract fruits. To actually execute it, we need concrete fruits, that is, objects with fruit-like properties in taste and texture and support for a polymorphic "cut" method (bananas need peeling, apples don't). Ok, so far that's an argument for polymorphism in the language. Now why inheritance? When talking about things, it really makes your life easier to give them names. I want to be able to specify an algorithm in terms of fruits, and later be able to refine it by saying "hey, a banana is a fruit, and by the way, you need to peel it before cutting it to pieces". That's a named abstract concept here, and an IS-A relationship, and polymorphism. OO, if you want. I'd feel very uncomfortable having to talk about "objects with fruit-like properties in taste and texture and support for a polymorphic cut method" all of the time, it's much better to be able to talk "fruits". This closely corresponds with my frustration when using C++ templates or Haskell/ML-style languages with algebraic data types: compile time type errors spanning multiple screen pages make my poor brain hurt. "Cheese is not a fruit" is much easier to parse. For the records, I'm heavily tainted by the CL and Dylan style of doing OO. Regards, Andreas _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
