Re: Clear doubts regarding the C++ Runtime
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Tue, 31 May 2005 11:51:59 GMT
Chris Torek wrote:
> Tim Prince <tprince@xxxxxxxxxxxxxxxxxxxx> wrote:
>> ritesh wrote:
>
>>> I have been reading some text on C and C++ (i.e advanced books).
>>> One of the books mentioned that C++ requires a runtime support
>>> whereas C does not ...
>
>> If you mean that it is usual to link shared libraries (such as
>> .so or .dll), that is true of both C and C++, but C++ requires
>> more of them. ...
>
> I suspect the real question was more about RTTI and/or exception
> handling, both of which complicate C++ enormously (compared to C).
> Of course, comp.lang.c is the wrong newsgroup on which to discuss
> either one.
>
>> ... Static linking will inflate the size of a C++ build much
>> more than a C build. Reasons for the differences are surely not
>> topical on c.l.c.
>
> Indeed.
>
> (In theory, of course, a C++ program that avoids using the RTTI
> and exception features -- and much of the rest of C++ along with
> them, since, e.g., "new" now throws exceptions -- could compile to
> similary-small static-linked binaries. Of course, if one is going
> to avoid all these C++ features, I would wonder why that one is
> writing C++ code at all. If one simply wants, e.g., the convenience
> of variable declaration at point of first use, C99 supports that
> already; and quite a few C compilers, while not yet "full C99",
> include this now as well.)
I think the primary conclusion is that the original "advanced" book
author is woefully misinformed. In fact I would characterize him
as "having his head up where the sun don't shine".
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
.
- References:
- Clear doubts regarding the C++ Runtime
- From: ritesh
- Re: Clear doubts regarding the C++ Runtime
- From: Tim Prince
- Re: Clear doubts regarding the C++ Runtime
- From: Chris Torek
- Clear doubts regarding the C++ Runtime
- Prev by Date: Re: sscanf and int64 in Win32 and Unix - different results?
- Next by Date: Re: compiling a simple program
- Previous by thread: Re: Clear doubts regarding the C++ Runtime
- Next by thread: Re: Clear doubts regarding the C++ Runtime
- Index(es):