MFC and real-world software

It’s great to see a serious update to MFC coming.  Check out this video with Pat Brenner where he describes some of the new stuff happening, with demos.

I’m really torn on C++ these days.  Some people believe it should basically be retired, in favour of one of the better alternatives like C# or Java, but C++ has a number of qualities that make it a truly enduring language.

It’s a humble language – it doesn’t impose any of its requirements on you.  You can use a bare minimum, portable runtime and write a C++ app that can be compiled and run on almost any platform.  When you do need to go looking for libraries, they’re out there by the hundreds of thousands.

Java, of course, requires a JVM, but also works to hide the platform from you.  When you’re coding in Java, your platform is Java, but in the real world, mainstream applications need to leverage the platform they’re running on.  Want to write a QuickLook plug-in for Mac OS X?  Or the equivalent preview handler on Windows?  You need to use native code.  There are all kinds of limitations that you bump into trying to write high quality portable client applications using Java.

C# doesn’t have that problem as long as you stick to Windows, but that’s the killer for C#.  You have to stick to Windows.  With the Mac platform making a resurgence, it wouldn’t make sense for anyone with the resources to do cross-platform development to start a new app in C#.  As long as the market for your application is big enough that 10% of sales would pay for the cost of creating portable code, it’s worth supporting the Mac.

With C++ you can use any UI toolkit.  Any system level API.  Anything.  No limits.  And thanks to the preprocessor, you can tune your code to the platform it has to run on.  That’s why C++ is going to be around for a long time.

I’m arguing in favour of C++ but MFC is still obviously a Windows-only UI technology, what’s up with that?  Well, often what happens in large cross-platform applications is the core of an application is portable, but the chrome is unique on each platform.  (Or, you write some kickass cross-platform UI that you use but not everyone has the resources for that).  Apps with chrome targeted to the platform are almost always better than portable apps that try to look the same everywhere.

So it’s very good to see Microsoft recognize this and update MFC.  Otherwise, we were destined to live with the 1995 look & feel of a default MFC application for even longer (or go shopping for UI toolkits that modernize MFC, but those come with their own sets of problems – like what happens when your tool vendor stops updating the toolkit you depend on).

“There is a larger number of MFC developers than we thought”.
– Pat Brenner

And it’s going to stay that way.  So thank you for the update.  Now where’s that improved C++ support in the IDE?