Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!weretis.net!feeder4.news.weretis.net!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: Why C++ is vastly superior to C Date: Tue, 17 May 2011 11:09:55 +1200 Lines: 37 Message-ID: <93dp63FlpiU12@mid.individual.net> References: <4a5f986b-c0c5-44e6-8668-e5d0061bb99f@s16g2000prf.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net Tb2t+2AYaCEYe7uRlYMJWAE2EETEOI4wbABWfNk+LLmxohDqn3 Cancel-Lock: sha1:QjEg/hv0+Gl1c+nnDl58zzFo6Ss= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:5046 On 05/17/11 10:58 AM, Stefan Ram wrote: > Joshua Maurice writes: >> Take C's sort. The comparator function is a function pointer, >> and the last I heard is that most compilers simply will not >> expand that inline, as opposed to C++ various sort functions >> which can be expanded inline. > > According to > > http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php > > C++ is not much faster than C (the median value actually is > a little bit slower than C if I understand the table right), > and according to That, as ever, depends on what you are doing. > However, C++ is much more complicated and large than C. > Programmers have to learn exception-safe programming, the > rule of the three, references, König-lookup, soon rvalue > references ... No, they don't. They may have to if they are supporting legacy code that uses every feature under the sun (which tends to be written by novices keen to use them!). For new projects, they can choose a subset they are happy with. > up to the point where, AFAIK, the recent > draft of the language specification has more than 1000 > pages, not including the C spec it is based one. The complexity of any given problem is constant. Whether that complexity is hidden in a language or exposed user code is a choice. Most of the new features will remove complexity from user code. -- Ian Collins