Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That doesn't address the constraints that are typical in embedded systems such as limited memory (RAM) and the expectation that a program will run forever.

There are resources oriented toward embedded C++ that address these (at least memory allocation.)

On a project a couple years ago I was pushing to use C++ instead of C, if only as a "C compiled using the C++ compiler" for better type checking. I could not convince the project lead, who's technical depth far exceeded mine, that the C++ compiler was as likely as the C compiler to produce correct translations.



I wouldn't worry about the compiler producing correct code, I would worry about the heap eventually fragmenting enough that an allocation fails (perhaps thousands of hours after the program launches). I know C++ offers the ability to supply your own allocator, but it's not for the faint of heart.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: