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: a07f3367d7,ab1d177a5a26577d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 17 Feb 2011 12:52:53 +0100 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110123 Thunderbird/3.1.8 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: What's wrong with C++? References: <104cfd9f-dbf5-4f05-9c4a-a2319dd371a9@glegroupsg2000goo.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4d5d0c16$0$6972$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 17 Feb 2011 12:52:54 CET NNTP-Posting-Host: 79d5c548.newsspool4.arcor-online.net X-Trace: DXC=TnPZnMDJ_8PYI9]OHn9o5^4IUKejVXIdnKl\ On 2/17/11 12:04 PM, J-P. Rosen wrote: > Le 17/02/2011 00:35, Peter C. Chapin a �crit : >> A macro defined in someheader.h might change the meaning of the >> declarations in someotherheader.h. > And especially the following one: > #define private public > > Great for those who think that information hiding is a nuisance! It is good to know that source code transformation can change the meaning of source text. I don't think this argument will convince. Is there substantial evidence of programs that #define private to be public? Might be. The change is a conventional trick to use with introspective languages, and useful. But anyway, the argument is easily refuted as by firing this riposte: procedure Safe is function "+" (Left, Right: Integer) return Integer is begin return 0; end "+"; A : array (Integer range 1 .. 2) of Integer; begin for K in A'Range loop A (A'First + K - 1) := 666; end loop; end Safe; Make "+" a little more obscure (if possible) and have a proponent of Ada look for the error... Or talk about the possibility (or not) of changing the definition of Integer temporarily to a debugging version of Integer whose operations we can trace.