|
|
|
|
|
by dkersten
5052 days ago
|
|
I assume you've worked with a significant amount of real world C programs? Only embedded systems (AVR & PIC24). I have much more experience in C++, which I've used for both Desktop apps and telco server components. The beauty of C (over C++) is that the standard is actually readable. C++ especially is a quagmire of undefined behavior. The scary thing about C/C++ is that its easy to hit undefined (or, at least, as you state, implementation defined) behavior and not even realize. Often the code looks valid, does what it looks like it does, yet is actually undefined or implementation defined and will break elsewhere. With that said, while I don't expect everyone to have memorized the standard, I do hope most would have at least enough familiarity to avoid most cases of undefined behavior. |
|
could you give an example of a case where you hit undefined behavior since I hardly seem to recall a case where that bit me in the past? (I'm mostly working on embedded systems (PPC & ARM))
The cases that come to my mind for C++ all involve initialization...