UNO, virtual base (or the lack thereof) problem

Noel Grandin noel at peralex.com
Thu May 30 03:27:38 PDT 2013


Hi

Because of the way UNO works, it is quite common for the same UNO 
interface to be implemented at multiple places in the class hierarchy.
The solution to this is virtual inheritance.

However, we cannot simply "turn it on" because:
(a) it would break binary compatibility
(b) there is quite a lot of code that would need to change
(c) It is quite likely that there is code that will stop working when it 
starts using virtual inheritance.

For this reason, I would like __as a temporary measure__[0] to introduce 
a "virtual" keyword[1] to the UNO IDL.
This keyword would have no meaning for languages other than C++.[2]

I don't think we can realistically expect to be able to implement 
virtual inheritance any other way.
A "big bang" approach would require massive amounts of testing and a 
fairly large patch.

With an incremental approach, we can modify the non-public bits first, 
flushing out bugs slowly and gaining experience with the likely problems.
Also, we can mandate that new UNO interfaces use virtual inheritance.

Then whenever we do our ABI-breaking release, we can spend that dev 
cycle sorting out the public interfaces.

Regards, Noel Grandin

[0] I do realise that "temporary" in this case is likely to be
     2-5 years :-)

[1] My proposed syntax is something along the lines of
     interface MyInterface {
        virtual interface MyBaseInterface;
     }

[2] Perhaps we can make the syntax more obviously C++ specific?

Disclaimer: http://www.peralex.com/disclaimer.html




More information about the LibreOffice mailing list