Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Modules again Date: Tue, 11 Dec 2018 14:53:02 -0800 Organization: None to speak of Lines: 38 Message-ID: References: <87o9a06lxq.fsf@bsb.me.uk> <87h8fkuxeg.fsf@bsb.me.uk> <0KTPD.240814$Ol2.168534@fx17.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader01.eternal-september.org; posting-host="275946b1da349bd65a81a462ad0938a6"; logging-data="12132"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ipvFkIEqVecc5xT9G+5Mu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:GGhXmemhprlK8SHJLvlVQM5o/W8= sha1:AgBxHOXgvugk4gnuer2wsvgzDRg= Xref: csiph.com comp.lang.c:138680 David Brown writes: > On 11/12/2018 20:42, Lew Pitcher wrote: >> Scott Lurndal wrote: >>> Lew Pitcher writes: >>>> Scott Lurndal wrote: [...] >>>>> I've worked on two operating systems and a hypervisor that were written >>>>> primarily in C + classes. But you could certainly just use C + >>>>> namespaces and leave the rest of your application in bog-standard C. >>>> >>>> Ahhh, but then you wouldn't be writing an application in "C", now, would >>>> you? >>> >>> Does it matter? >> >> Yes, it does matter. > > Sometimes it matters - often it does not. It is no different from using > any other dialect of C, such as "gcc C" with its extensions - for some > kinds of coding, such extensions are totally inappropriate. For other > types of coding, they are not only entirely reasonable but absolutely > essential. > > You need to be clear about the dialect or version of C you are using, > that it is non-standard, and the tools and options needed to compile it. > But if the project is suitable, then there is no reason not to use it. If you're using some "dialect" of C (or of C++), your compiler isn't going to warn you if you accidentally write something outside that dialect. If you can live with that, or if you can enforce the restrictions using some other tool, that's fine, but it's a valid reason not to try to use a subset of a language -- Keith Thompson (The_Other_Keith) kst@mib.org Will write code for food. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"