• Welcome to Powerbasic Museum 2020-B.
 

Can't Figure Out How To Get Interface From Which An Interface Inherits

Started by Frederick J. Harris, November 09, 2011, 08:35:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

José Roca

Apparently, I know more about C++ SDK headers that many C++ programmers. Must be because I have translated more than 1,000 of them :)

Mike Stefanik

Quote from: Frederick J. Harris on November 10, 2011, 02:42:21 AM
Again, part of it is just me.  I see nothing wrong with the way Microsoft went about creating their non standard #import directive.  Its just that all the macros, typedefs, templates, so on and so forth create code I don't even like to look at.  There is a certain aesthetic component to coding and understanding how stuff looks and works, and that stuff just doesn't 'cut it' for me.  Maybe tomorrow I'll post a little bit of it.  Smart pointers and stuff.     

Not to begrudge anyone their own personal pet peeves, but the whole idea behind #import is that they're transitory files; they're not there to be "human readable" and part of the source tree, they're automatically generated and there for the benefit of the compiler, not you. It would be like complaining about how some C/C++ code looks after it has been run through the preprocessor; it's all stuff behind the curtain that you typically don't need to worry about.

As for smart pointers and "stuff", you may not like them but they're extremely handy when it comes to making sure that you're actually freeing memory and releasing objects correctly. Unless you're a huge fan of sprinkling AddRef and Release everyhere in your code (including excpetion handlers, which is where most programmers forget to manage the lifetime of the objects they create). So unless you're a fan of memory leaks and orphaned COM objects, generally speaking, smart pointers are a good thing.
Mike Stefanik
sockettools.com

José Roca