Programming Pointers
Dan Saks, a widely recognized expert in C and C++, offers tips and techniques to embedded developers.
Return to Embedded.com home page.
Dan Saks
5/2/2012 6:24 PM EDT
Dan Saks crunches over 12 years of data on programming-language preferences from reader studies and finds some surprises about C/C++.
The same can be said for Executable UML models as well, but the poll doesn't show much adoption in ...
Dan Saks
4/4/2012 1:21 PM EDT
Class derivation and virtual functions let you define a common interface for related classes with similar, yet distinct, behaviors.
Looks like there's still is a lot to learn about C++. I think I already heard before about Virtual ...
Dan Saks
2/27/2012 12:14 PM EST
Discriminated unions can be useful in some applications, but they also provide insight into the advantages of using virtual functions.
this is common to all OOP languages - a class KNOWS which class it is, what kind of object an ...
Dan Saks
12/6/2011 4:02 PM EST
Writing better hardware interfaces may require writing fairly elaborate declarations. It's probably worth the effort.
That 0x12 should have been just 12. Thanks for catching the typo.
Using member new to map devices
Dan Saks
11/18/2011 10:00 AM EST
Declaring operator new as a class member can be a handy way to provide guaranteed initialization for memory-mapped objects.
I use a chip that has 6 identical UARTs that differ only in the base address of the memory mapped ...
Calling constructors with placement new
Dan Saks
8/31/2011 1:50 PM EDT
New with placement offers C++ developers explicit control over how and when to initialize memory-mapped objects.
It seems like this solution is overly complex. Why not use the constructor's initializer list? This ...
Difficulties constructing memory-mapped objects
Dan Saks
7/29/2011 7:21 PM EDT
Defining constructors for classes representing memory-mapped devices is a good idea, if only you could get those constructors to run automatically.
Im not following how placing the entire class at a specific location is getting the memory mapped ...
Dan Saks
6/1/2011 12:09 PM EDT
Using member initializers offers more control over what constructors do, and helps eliminate unnecessary default initialization.
Also , apart from initializing const member data variables which could not be done without member ...
Insights into member initialization
Dan Saks
4/27/2011 7:27 PM EDT
Often when it seems that C++ is generating bigger and slower code than C, it may be that C++ is actually just distributing generated code differently.
Constructors and object definitions
Dan Saks
3/2/2011 6:57 PM EST
C++ compilers generate translate object definitions into constructor calls. Dan explains what to expect from the generated code.
A little bit of "object oriented" programming can go a long way in keeping your C code clean. The ...


