On 20 March 2010 00:43, Jonathan S. Shapiro <[email protected]> wrote: > On Fri, Mar 19, 2010 at 3:49 PM, Michal Suchanek <[email protected]> wrote: >> >> > 1. How important is inheritance in the eyes of people here? >> >> I personally like some sort of inheritance in terms of >> >> 1) having some sort of objects >> >> 2) having the ability to extend the objects > > To what degree does record polymorphism address this sufficiently? The > main difference between record polymorphism and inheritance is the > possibility of virtual functions.
I would say that virtual functions in one form or another are one of the cornerstones of a typical OO languages because they are exactly the feature used for extending objects. The same can be probably done without inheritance and virtual methods by defining an interface and implementing it differently in different objects. Translating code between the two would be somewhat difficult I guess, though. > >>> 2. Can anybody identify an "acceptable cost" strategy for transcoding C++ to >>> BitC without it? >> >> It depends heavily on the codebase you work with.... > > I asked the question badly. The goal is to be able to transcode as > much existing C++ code as possible, without regard to idiom. > >> > 3. Can anybody identify a sensible way to interoperate effectively with the >> > Common Type System without single inheritance? >> >> There is alternate approach to "inheritance" - querying the interface >> of the object. You can either associate objects and interfaces in some >> way or you can just check that the method(s) you want to call exist at >> the appropriate arity. > > I believe that this relies on runtime reflection, which is definitely > an interface we do not want to be dealing with. > You can do this statically with the likes of implements Blah; but I do not use languages which do this sort of stuff too much so I don't have much idea what it entails. Thanks Michal _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
