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

What I was trying to say is that if you're comfortable using modern C++ and try to switch back to a C++ compiler from the early 90s you are going to find a lot of the features you regularly use suddenly being absent. With C this is much less of an issue.


The newer C features that you're most likely to feel the lack of in an older compiler are:

1) Mixed declarations and code. All variables must be declared at the top of a basic block.

2) Along similar lines, declaring variables in control statements like for().

3) // comments. (Hardly a critical feature, but you're probably used to having them.)

Perhaps not coincidentally, I think these were all features which began their life in C++, and were backported to C in C99.


IIRC they were also available as “non-standard” feature in compilers at the time before being added to c99 (e.g. I’m pretty sure gcc in the late 90s supported all of these if you didn’t force c89 compatibility).


Sorry, I misread your comment, that makes a lot more sense now!




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

Search: