3 ms·
I think Mozilla has historically had a lot of COM outside of Windows. But there's been a goal to remove it: https://wiki.mozilla.org/Gecko:DeCOMtamination http
by asveikau 4y ago
I think Mozilla has historically had a lot of COM outside of Windows. But there's been a goal to remove it: https://wiki.mozilla.org/Gecko:DeCOMtamination https://wiki.mozilla.org/Gecko:DeCOMtamination
I believe VirtualBox is another project with COM on other platforms. I see lots of GUIDs and HRESULTs in their error messages.
I actually really like the COM style when done well. HRESULT, the idea of somewhat standardized error handling that sub-divides the space of a 32-bit integer into various subsystem-specific error codes, is one of my favorite ideas from there.
Some things are not so nice. For example, everything being a virtual call is not good for performance. Reference counting is also great but over-use of it is also not great for performance (for example, in C++ it's considered poor form to make everything std::shared_ptr<> when you can get away with less).
- Dwedit 4y agoThe goal to remove it applied to internal use, for things which aren't exported. Which makes perfect sense, COM-like interfaces are only needed when you cross module boundaries, and need an fixed ABI.
- asveikau 4y agoI find when you get in the groove of the COM style, especially its consistent error handling, you want to use it within modules too. But I think part of their objections for within a module (from memory, because I haven't looked into their rationale in a while) is it's not worth the performance cost.
- lmz 4y agoIt's been reimplemented multiple times. Besides Mozilla's XPCOM there's also StarOffice/OpenOffice.org/LibreOffice's UNO.
- mkoubaa 4y agoMy company has at least 3 implementations of cross platform COM (one organic, the rest through acquisitions)