Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: comp.lang.c,comp.lang.c++ Subject: Re: C as a Subset of C++ (or C++ as a superset of C) Date: Tue, 28 Aug 2012 10:57:06 +0200 Organization: A noiseless patient Spider Lines: 32 Message-ID: <503C87E2.5080504@loria.fr> References: <503A62EC.5050909@spamsink.net> <503A9A40.20803@loria.fr> <503B9F4E.600@loria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="a5c18addaa58cf05a8c5d627b8257be9"; logging-data="13472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FKdJoB+rjzT+RL2bopXa8mCdvX2v/hIw=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 In-Reply-To: Cancel-Lock: sha1:vDl1Qmjd/dGTdvoj0nsP5WN2Up0= Xref: csiph.com comp.lang.c:25208 comp.lang.c++:17973 Am 28.08.2012 10:21, schrieb David Brown: > Basically, I just want to be able to mix and match C and C++ code > freely. I want to be able to write in the same style in each language. > If I am not using C++ features, I want the code to be compilable as C > or C++, with the same functionality each time. And I want to be able to > do so without artificially restricting the features I can use in C. It's > okay if I have to #include a few standard headers, and put in a few > extern "C" wrappers. > > Am I really asking too much? personnaly, I don't think so, but seen in the historical context, most likely. > (Here's another thing C should support - it should accept extern "C".) Ah, yes, a good one. Sometime the next days, if and when I find the time, I'll probably start to compile a list of these things. Or better three list - C features missing in C++ - C++ features missing in C - points where both should (and could) move to meet on a common ground I already have a list of defects and feature requests for C. That would perfectly fit, there. Jens