Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: C/C++ question about dynamic "static struct" Date: Sun, 21 Oct 2012 21:09:54 +1300 Lines: 32 Message-ID: References: <507F380B.2060402@verizon.net> <8q66l9-lkm.ln1@wilbur.25thandClement.com> <5081D9DA.6020103@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net AUsg5lrxpL1BlmBFQdhayAb4/ONCnqQKrZHPsXj1nmJ6Ua9kUV9h1Z4WWi03T4NjDr Cancel-Lock: sha1:wSSf5VVuSb7qY4e9M+8i2t6+K/8= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:12.0) Gecko/20120423 Thunderbird/12.0 In-Reply-To: Xref: csiph.com comp.lang.c++:19158 comp.lang.c:27455 On 10/21/12 20:51, Les Cargill wrote: > Juha Nieminen wrote: >> In comp.lang.c++ Les Cargill wrote: > >>> C++ is much *worse* for memory management than is 'C' >> >> Ok, you lost all credibility. I don't think it's necessary to go further. >> > > I've built significant, non-embedded, production systems using only > 'C' that used no dynamic allocation at all. It doesn't get any less > worse than that. It wasn't difficult. You can do that in C++ too, but > it's a lot less ... sensible. Why? It's not uncommon to have static embedded C++ applications. > I have never understood why managing memory allocation manually was > considered to be so onerous. Perhaps it's a personal failing. And > limitation can be extremely important to the general creative process. It is also the cause of an awful lot of bugs.... > I suppose my main gripe about C++ is just how much harder it made it > to dynamically configure a running system. If all the cardinalities and > sizes have to be declared at instantiation of all the objects, you > have then to tear them all down and rebuild them when a message to > reconfigure comes through. This can be a serious liability. The difference to C here is? -- Ian Collins