lkml.org 
[lkml]   [2014]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: OT: Open letter to the Linux World
On 2014-09-04 06:16, Alexander Holler wrote:
>
> It's a myth that C++ ends up in bigger code than C. At least in my
> experience. Especially when the latest additions to C++ are in effect
> (like the move-semantics in C++11 I like quiet a lot and which you get
> almost for free (by changing nothing) when you use the STL). Thread
> support is now also standardized (in C++11), quiet nice to use.
Assuming you are writing in a standalone environment (no standard
libraries), then yes, your code will usually be about the same size
(unless you go way overboard with the object-oriented stuff); but the
runtime is larger in almost all non-standalone environments, and there
are some cases that code does end up larger in C++. A lot of 'Clean C'
(stuff written so that it compiles correctly as C, C++ and Objective C)
that I have seen seems to end up larger (by about 4-6%) when built as
C++ (although it usually does much worse as Objective C).

[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2014-09-04 17:01    [W:0.055 / U:3.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site