Sounds like you have been in the trenches with C++. Thanks for the war stories.
Pretty much all the C++ I have ever written has been for space constrained Linux based embedded systems. It's always had to run on Mac and Windows if only so that developers can work on it with their favorite machines and tools. Insisisting on cross-platform operation also shows up all kinds of bugs and other weirdness in your code.
Most of the time I don't even like to use any new/delete, having worked on small real time systems for so long I get nervous about the non-deterministic nature of any kind of memory allocation.
Other than that it's been simple Qt based GUI stuff.
As such the STL is unfamiliar ground for me and Boost is on another planet.
Templates, as used in CRTP, are wonderful things. Templated class definitions and such can be very long, complicated, ugly and incomprehensible. But after all that they don't actually generate any code.
Heater,
Yeah I have been working on C++ codebases for something like 16+ years. Some of which have been multi-million line monsters with many exe's and dll's sharing code and needing to work on multiple platforms.
In embedded land I've not really done any C++. Plenty of C and ASM, and of course some Spin/PASM. I'm just starting to use some C++ in a project I'm working on for the Prop (on a custom board).
Comments
CRTP doesn't consume any extra resources, at least in this test:
Where I have it output the same either directly or via the CRTP. Both times compiled to 2996 bytes.
Sounds like you have been in the trenches with C++. Thanks for the war stories.
Pretty much all the C++ I have ever written has been for space constrained Linux based embedded systems. It's always had to run on Mac and Windows if only so that developers can work on it with their favorite machines and tools. Insisisting on cross-platform operation also shows up all kinds of bugs and other weirdness in your code.
Most of the time I don't even like to use any new/delete, having worked on small real time systems for so long I get nervous about the non-deterministic nature of any kind of memory allocation.
Other than that it's been simple Qt based GUI stuff.
As such the STL is unfamiliar ground for me and Boost is on another planet.
Templates, as used in CRTP, are wonderful things. Templated class definitions and such can be very long, complicated, ugly and incomprehensible. But after all that they don't actually generate any code.
Yeah I have been working on C++ codebases for something like 16+ years. Some of which have been multi-million line monsters with many exe's and dll's sharing code and needing to work on multiple platforms.
In embedded land I've not really done any C++. Plenty of C and ASM, and of course some Spin/PASM. I'm just starting to use some C++ in a project I'm working on for the Prop (on a custom board).