3 ms·
> forced to use COM a few times, and that doesn't sound very encouraging I use COM a lot and I love it. The problem with COM is it’s too many things at once.
by Const-me 10y ago
> forced to use COM a few times, and that doesn't sound very encouraging
I use COM a lot and I love it.
The problem with COM is it’s too many things at once.
It’s an excellent ABI.
At the same time it’s crappy RPC and overengineered serialization framework. In addition, registration could become a point of failure.
You can only use good parts and ignore the bad ones. See how MS did it with their Direct3D or MediaFoundation.
> 10-level nested if in that code
You can write shitty code like that with any framework and in any language. Doesn’t say anything about a framework or language.
Apparently, there’s some stupid policy that prevents them from using ATL in their code samples.
With CComPtr instead of raw interface pointers, you can just return the code when FAILED(), the destructor will release the objects as needed.