My latest column for MSDN Magazine is now available online as well as in print.
Last month I explored a simple technique that you can use today with any C or C++ compiler to implement lightweight cooperative multitasking by simulating coroutines with macros. Although adequate for the C programmer, it presents some challenges for the C++ programmer, who naturally and rightly relies on local variables among other constructs that break the abstraction. In this column, I’m going to explore one possible future direction for C++ to directly support asynchronous programming in a more natural and composable way.
This is the second of three articles where I explore alternative techniques for achieving concurrency in C++. Thanks again to Artur Laksberg from the Visual C++ team for reviewing the drafts and providing valuable feedback.
You can find links to more of my articles here.
My new course is now available on the Pluralsight website. Aaron approached me a few months ago about authoring some courses. At first I was somewhat hesitant since I hadn’t done any in-person training before, rather focusing on articles and other written material. The adjustment to training videos took some time but in the end I really enjoyed the experience and hope you enjoy the results!
So why C? Aren’t I the C++ guy? Well I don’t really see them as such separate topics. C is the foundation of C++. To be a competent C++ programmer you need to thoroughly understand the C subset of C++ and that’s really the way I look at it. C is a subset of C++. I cover C89 which is the version used almost exclusively today and which modern C++ is based on. I also assume that the C programmer will naturally use C++ if and when appropriate so compatibility is critical and I stress that in this course.
But as a programmer who learned C++ as a first language I have realized that there are still many places where C dominates and C++ has not yet been able to flourish. Embedded systems programming is the obvious application but there are others. But again, these scenarios are not exempt from the influence of C++ and a measured and careful use of C++ can make these environments more manageable.
Anyway, the C Programming Language course is a good foundation for both aspiring C and C++ programmers. The plan is to release additional courses that will cover related topics such as embedded systems programming, real-time C++, and so on.
For now, please watch my new course and let me know what you think. Whether you are just starting out as a programmer, or have spent years with C++ but want to get a better foundation in C, or perhaps you have focused on managed languages and want to get back to the heart of computer science, I hope this course will help you to improve your craft!