Standards are important. Standards makes it clear what to expect or what is expected of you. If you are still wondering what I am talking about, well then a bit of an explanation follows: I am talking about official standards as published by a Standard Organisation (such as ISO etc…). I want to quickly give my brief opinion C++/CX, a small deviation from the C++ standard, where, in my opinion, it is not quite clear cut whether the decision to deviate from the Standard was a good thing or a bad thing.
C++/CX, according to the Microsoft site (here), is a set of extensions to C++ that are targeted at Windows Store and Windows Runtime development. I came across C++/CX when I was reading some Windows 8 development tutorials and have not yet used it very much. My first thought was “why? oh why do you do this to us?”. Why not just make use of standard C++? First of all the applicability of a Standard in the context of Windows Runtime development isn’t as important since we are confined to that specific context. The applications developed are not aimed at being cross-platform, and developers are not likely to try and use a different compiler (although sometimes that might still be nice).
But there are other reasons that maybe we should stick to the Standard? How about the fact that a C++ developer has to now contend with and learn new language constructs that wouldn’t normally be seen in a C++ program? The other side of this argument is that experienced developers normally have no issue coming to terms with new programming languages (and since C++/CX introduces new syntactical elements is has to be defined as a altogether different language).
Maybe something can be found if the reasons for such a deviation can be inferred. This is trivial – the deviations have introduced new language features obviously intended so that developers do not have to cobble a lot of code together for elements that occur frequently in Windows Runtime programs. I have found some of these features to be interesting and potentially useful (interfaces, accessor methods etc.)