13. March 2007 17:17
Scott Hanselman has been accused of being a managed snob. Surprisingly for Mr Hanselman, he seems to revel in it:
If being a Managed Code Snob is wrong, I don't wanna be right.
I say "surprisingly" because I wouldn't expect Scott to fall into the "if all you've got is a hammer, everything looks like a nail" mentality.
Now, I'm being slightly oblique here, because Scott's really responding to FUD-like comments on poor performance. But I think it's important to remember that being a managed snob when it comes to addins has consequences. By implementing an addin as managed code when it doesn't explicitly support a managed API, you're changing the shape of the application. You're forcing that application to take a dependency on .net.
And if the user has explicit knowledge of this, knows and accepts the consequences, then more power to your elbow. But that's not for the developer to decide.
Here's a great example of how a COM object was implemented in .net and used in an application that didn't natively support .net, and how it caused serious problems and several days of frustration. Yes, that's another link to Scott's blog; let's just pause to appreciate the irony. How much did the .net productivity and maintainability help here?
Not everything's a nail. Pick the right tool for the job.
And for future reference - and because anyone who knows me knows I can't leave stuff like this alone - performance of .net is very impressive, but I've not yet seen a .net desktop app that starts up as quickly or is as responsive as a native app. And maintainability alone is never a good reason to write in .net. You can write bad code in any language. Maintainability comes from well structured code and lots of tests.