In the end, I think that there is a pragmatically overwhelming reason to
incorporate single inheritance and interfaces into BitC: immediate utility.
There are simply too many libraries out there that we need to be able to use
that are framed in terms of classical OO.

 

 

 

Regarding consuming libraries  there are a number of counter points

-          Most Unix / Open libraries are still C 

-          These libraries will often have interop and their own separate GC
/ memory management and hence require some sort of wrapping layer anyway. Eg
you cant call a C# or Java lib.

-          Most OO libraries also use  Multiple inheritance / Virtual
methods /Abstract methods / Abstract  base classes / Templates / Generics..
not much point doing the OO without that as it just wont work.

-          You can emulate the calls eg use Type classes and some tricks .
eg if you are using the CLR and want the .NET standard libs , these use
little inheritance ( with the exception that everything inherits from
Object) but a lot of interfaces.  In most cases all you need is some
attribute or trick to get the compiler to generate  the inheritance  in CIL
, this could be belong to a type class  etc. Consider for .NET the most
common OO thing  you will need is IComparable<T> which should just map to a
type class.

 

Ben

 

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to