I’ve been playing with Metro off and on for a few months now, my frustration levels mounting everything I try to do something I already know how to do. Most of this I’ve come to realize is because of Microsoft’s attempt to morph existing languages and API’s into the walled-garden of WinRT. They went and bastardized the languages that Visual Studio supports to enable use of reference counted resources and forced nearly any API call to be choked through a dispatch-callback mechanism and try to hide it all through syntactic sugar.
Now, I understand the reasoning behind this. the reason for the reference counting and the use of nonblocking API calls are all designed to foster a fast and fluid user experience, that won’t end up eating system resources when an application isn’t active. But why they try to hide the fact that some API calls result in a callback I think they are doing a bit too much in trying to hide the threading model from the programmer – particularly when they make it look like you are writing single threaded code – nay, they encourage this style of obfuscation. Now all the Basic, Javascript, HTML5 programmers out there may be fairly unfamiliar with multithreaded programming, heck i find that even the C# and C++ programmers are usually fairly innocent of multithreading techniques. But this style that they’ve come up with I think does a disservice to programmers. A lot of my work focuses on making programmers understand how to make their programs run faster and more efficiently on a particular platform, and to understand the tradeoffs and opportunities that they are presented with. Microsoft is going out of their way to hide the fact that you’re starting a background process and are waiting at a completion point for a task completion notification to signal, missing an opportunity to present the programmer with the opportunity to do some useful work instead of (seemingly) spinning, waiting for the action to complete.
Granted, you don’t have to do it the way they show in the examples, but that presupposes you know what’s going on under the hood. And the current way they have it set up discurages most programmers from ever discovering there’s a different and potentially more productive way of doing something.