President, Saks and Associates - Embedded System Design
Dan Saks is president of Saks & Associates, a C/C++ training and consulting company. For more information about Dan Saks, visit his website at www.dansaks.com. Dan also welcomes your feedback: e-mail him at email@example.com.
Most programming languages have dark corners. C seems to have more than its share. Almost all C programmers struggle to some extent with parts of the language that they don't quite understand. (C++ programmers struggle with many of the same features.) That which you don't understand could be hurting your productivity, reducing the quality of your work, and taking away some of your fun. This session shines a bright light into some of the darkest corners of C. The insights you'll gain should help you be a better, more productive, and happier programmer.
The C++ programming language is a superset of C. C++ offers additional support for object-oriented and generic programming while enhancing C's ability to stay close to the hardware. Thus, C++ should be a natural choice for programming embedded systems. Unfortunately, many potential C++ users are wary of C++ because of its alleged complexity and hidden costs. This session explains the key features that distinguish C++ from C. It sorts the real problems from the imagined ones and recommends low-risk strategies for adopting C++. Rather than tell you that C++ is right for you, this session will help you decide for yourself.
C is a general-purpose programming. However, it's a relatively "low-level" high-level language that provides direct access to many hardware-level facilities. Thus, for more than two decades, C has been the preferred language for programming embedded systems.This session explains the key features of C that distinguish it from many other programming languages and make it such a popular choice for embedded systems. It also explains where the dragons are lurking and why others languages might be more suitable in some situations.
C++11, the new international standard for C++, introduces a significant number of new features, some of which may be very helpful for embedded programming. While many features are not yet available in current compilers, others have been available for a few years. This session explains a number of these new features that enable better low-level programming, including static assertions, strongly-typed enums, generalized constant expressions, and whatever else we have time to cover.
Some embedded systems have constraints that preclude using dynamically allocated memory. Some industry guidelines require safety-critical systems to avoid dynamic memory management. Many embedded developers seem to have the misconception that you can't use the C++ Standard Template Library (STL) without also using dynamic memory allocation. This isn't true. Granted, some parts of the STL pretty much demand dynamic memory. However, you can use other parts very effectively with only statically and automatically allocated memory. This session explains which parts of the STL you can use without dynamic memory and how those parts can be surprisingly useful. It also presents techniques you can use to automatically detect when your program inadvertently uses dynamic allocation.