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!news1.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 16 Feb 2011 17:35:23 -0600 Newsgroups: comp.lang.ada Date: Wed, 16 Feb 2011 18:35:07 -0500 From: "Peter C. Chapin" Subject: Re: What's wrong with C++? In-Reply-To: <104cfd9f-dbf5-4f05-9c4a-a2319dd371a9@glegroupsg2000goo.googlegroups.com> Message-ID: References: <104cfd9f-dbf5-4f05-9c4a-a2319dd371a9@glegroupsg2000goo.googlegroups.com> User-Agent: Alpine 2.00 (WNT 1167 2008-08-23) X-X-Sender: pcc09070@vtc.vsc.edu@webmail.vtc.edu MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-quWeB2j2clCeXQRv/tRgGcGK0J/JCIWEVRHXLfGeqF2v7bY3TSikzwFGKzEvedOzWCJsoCfBNbdXQk2!0JqlKsABIFMJErfqtOAY0ZWuzHUdZLKJ2eFDEtW7/jVo3VU9K8XvyiqhgqPoF+6+E+scb3MUAg== X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2401 Xref: g2news1.google.com comp.lang.ada:17318 Date: 2011-02-16T18:35:07-05:00 List-Id: 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. Peter