Monday, October 15, 2007

COM attributes, C++, and MS's fail

Attributes... simplified programming model, hides the complexity of COM, allows easy specification without obscure syntax, must be a good idea, right? Nope, FAIL.

The problem lies in the failure of documentation and ubiquitous support for the other MS libraries. Specifically, are you using MFC (and really, most native C++ Windows programmers probably are, duh)? Sorry, attributing breaks your application. Not that you could tell, since converting to attributed leaves all the other files in the project, and creates new hidden files with the current interfaces. Um... UTTER FAIL.

Not to mention the attributes themselves. How do they work? Oh, don't worry about that. Where can I see the source? You can't, it's compiled into DLL's which inject it. How can I see what it's generating? Compile with a special flag, and look for the hidden, undocumented files it might generate. How can I debug issues? Um... online support forums maybe? UTTER FAIL.

Nothing pisses off native developers like not being able to see what's going on. Over 50% of why people stay native developers is a lack of faith in the ability to diagnose and fix problems because the lower level code will be too hidden to figure out what's going on. What could be better to convince these developers to go managed than introduce some managed-like syntax and show how easy things could be? Except the syntax (attributes) exemplifies the exact reasons why those programmers haven't adopted managed code, and solidifies their decision to stay native as the correct one. Two words for MS: UTTER FAIL.

I'm done with attributes for COM objects. Yes, IDL and ATL are hideous, but gobs of hard to read code is better than not being able to fix problems or understand what's going on. You can take that as a free mantra whenever you take the next pass at trying to convert native developers to the next big thing.

No comments: