Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c++ Subject: Re: To C or not to C++ Date: Wed, 10 Aug 2022 13:13:49 -0700 Organization: None to speak of Lines: 22 Message-ID: <87edxnq2ki.fsf@nosuchdomain.example.com> References: <2868500762@darkrealms.ca> <87pmh8q5r9.fsf@nosuchdomain.example.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="122cc4663e73c704c62683f159d0c587"; logging-data="2031602"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1878eL5VFSTfKbsc31FWxVC" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:h0J1Og/M6J/ErgTnQcwCYlWAO08= sha1:QZ52ZC0cyNbY0yFWlUK9s9jhpqw= Xref: csiph.com comp.lang.c++:85839 scott@slp53.sl.home (Scott Lurndal) writes: > Keith Thompson writes: >>Manfred writes: >>> If you are writing code that compiles both as C and C++, then you are >>> in fact writing C code, not C++. >> >>Or you might in fact be writing C++ code. Which it is depends on which >>compiler you intended to feed it to. It might be a fragment of a larger >>C++ program that doesn't happen to use any C++-specific features. > > Or you might be writing code to solve a problem and realize that > calling it C, C++, C/C++ or fred doesn't matter so long as the > program solves the problem. It matters because it's not going to solve the problem unless you feed it to a language-specific compiler. If you don't intend to do that, you're writing pseudo-code. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */