From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ab1d177a5a26577d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Chuck" Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? Date: Fri, 18 Feb 2011 01:16:49 -0600 Organization: A noiseless patient Spider Message-ID: References: <104cfd9f-dbf5-4f05-9c4a-a2319dd371a9@glegroupsg2000goo.googlegroups.com> Injection-Date: Fri, 18 Feb 2011 07:16:52 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="Nvo31E/p3EKlT4bDI5+9FA"; logging-data="29075"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UfviogUFSauLuoxDFixJC" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-RFC2646: Format=Flowed; Response X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Cancel-Lock: sha1:uXChc/uEAqEdxhSIUGCBfV4LQ48= X-Priority: 3 X-MSMail-Priority: Normal Xref: g2news1.google.com comp.lang.ada:17407 Date: 2011-02-18T01:16:49-06:00 List-Id: Peter C. Chapin wrote: > On Wed, 16 Feb 2011, Hyman Rosen wrote: > >> It sounds like a complaint that C++ requires source inclusion >> (directly or via preprocessor #include directives) of type and >> object declarations into a compilation unit, while other languages >> have syntax for requesting a type set (class, package, etc.) whose >> definition is then sought out by the compiler in an >> implementation-dependent way. Personally, I don't find the long >> strings of 'import ...;' or 'with ...; use ...;' statements any more >> appealing than '#include "header.h"', but I suppose it's "purer". > > C++'s model of #include is a major project because the compiler does > not really know what is going on and the preprocessor can do > arbitrary editing of source code. For example > > #include > #include > > A macro defined in someheader.h might change the meaning of the > declarations in someotherheader.h. I've had this happen to me many > times... in headers that I did not write and over which I have no > control. Often the problem can be fixed by rearranging the order of > #includes or by selectively #undef certain macros. However, it's a > problem that just shouldn't exist. So solve it or shut up. I spewed on another channel about the value of headers. Maybe I'm wrong. Maybe I'd pay you as a consultant and then find out that you raped me for money about common knowledge. Then I would hate hate you. (Lest you think I don't have this "problem" solved, I assure you it a trivial issue and you should keep your taxicab).