tiemann@MCC.COM (Michael Tiemann) (05/09/88)
David Jones responded to this statement, > > There is very little that makes C programs choke in the C++ translator. as I might have: > In this case, "very little" is quite a bit. > > You didn't mention that C++ treats the name-space differently: There > is no separate lookup table for "struct this" and "struct that". That's > another "little thing" that makes C++ not a superset of C. And as > you mentioned in a part that I edited out, ANSII C is adding new keywords, > so C and C++ will diverge even further (if you will allow that ANSII C is > C, and not a new language per se, an arguable point). > > [...stuff edited out here...] > > Since you were discussing changes to C++, here's my preference: > Do function prototypes the ANSII C way, and do the name-spaces the > old C way. But there may already be too large a body of C++ code out > there to do that. And then there's the books in print. > Still, for my own purposes, that's what I would like to see. It > would be great if C++ could be made a proper superset of ANSII C. I would like to ask for input from the C++ user-community about this particular problem. This is strictly a solicitation of opinion, and should in no way be taken as a suggestion on my part that I have any intention of implementing whatever changes would be required if the opinions I gather fall to one side or another of this (potentially) delicate issue. Here is my question: if there were some way (via magic) in which programmers could suddenly cause their existing C++ code to come automatically into line with C-style struct namespace rules, yet maintain the clean C++ automatic typedeffing for class objects, would you allow such a thing to transpire, or would you prefer to maintain the C++ code as it is, disregarding stricter C compatability. Again, do not interpret my action as a call-to-arms to separate the GNU C++ community from the AT&T C++ camp. My only reason for asking is because there is a 76,000 line C program (can you guess what it is?), and I would like to migrate portions of it to GNU C++. I am curious whether other people are faced with the same problem, and if so, what approaches might be taken, practically and ideally. Michael