Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!news.wtal.de!news.tal.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: Oozing poison Date: Thu, 26 Jan 2012 08:56:31 +1300 Lines: 27 Message-ID: <9ob53fFte0U2@mid.individual.net> References: <2f356856-3e59-442f-b711-bde8e13d8beb@o14g2000vbo.googlegroups.com> <9038aa7f-e263-4309-a67e-f70d2caafe26@t8g2000yqg.googlegroups.com> <9563593d-8d88-49a8-b390-e07b77d27faa@v14g2000yqh.googlegroups.com> <4f1b85d7$0$24603$c3e8da3$e408f015@news.astraweb.com> <4f1f7b98$0$28282$c3e8da3$3a1a2348@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net rSaw7UpRz2qnIIkeFQ656QhRYOmEGWusEbJdbR3Qws3R1WclO3 Cancel-Lock: sha1:QH8rvqWWblksv69a87HzHQSGyTM= User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:6.0.2) Gecko/20111003 Thunderbird/6.0.2 In-Reply-To: <4f1f7b98$0$28282$c3e8da3$3a1a2348@news.astraweb.com> Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:13586 On 01/25/12 04:48 PM, Pavel wrote: > Jorgen Grahn wrote: >> On Sun, 2012-01-22, Pavel wrote: >> ... >>> I guess, everyone's mileage varies. For a change, I am on AD side in this >>> C-vs-C++ maintenance/reviewing issue although for different reasons. Reading C++ >>> code takes, in my experience, much longer time than C code of equivalent >>> complexity because there are on average more (commonly used) meanings for >>> identically-looking C++ code than C code. I have already given on this group an >>> example that, in C, you pretty much know that f(a) does not change a -- but not >>> in C++. >> >> I don't see the problem. You review f(A&), and immediately see that it >> can modify its apparent argument. So you ask yourself "will this be >> obvious in the calling code, based on the name of f and so on?" If the >> answer is "no", you fail the code. > Even letting alone that failing all such code you encounter prevents you from > staying on schedule: It sounds to me like you have a process problem rather than a language one. I don't thank anyone can do a thorough job of reviewing anything other than small sections of unfamiliar code without the involvement of the authour or someone else familiar with the code. -- Ian Collins