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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5117b1b6391a0e06 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: A simple ADA puzzle (I haven't the answer) Date: Fri, 18 Jun 2004 14:41:39 +0200 Message-ID: <1in5d05aa4rfqlt7e76gk87ucd3vuru6pm@4ax.com> References: <1087410710.477506@master.nyc.kbcfp.com> <1087474761.60413@master.nyc.kbcfp.com> <7o83d0hf6sqgng2980e1tg7iu864m5m50u@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de yvKb6i6H9M/TG3sR+4posQGDBA+9oKMVoX363ACYxFVSM2Y2M= X-Newsreader: Forte Agent 1.8/32.548 Xref: g2news1.google.com comp.lang.ada:1656 Date: 2004-06-18T14:41:39+02:00 List-Id: On 18 Jun 2004 11:14:44 +0200, Ole-Hjalmar Kristensen wrote: >What do you mean it does not work in C++? It works just fine, >and you may even do: > >class Base{...}; > >Base* foo () >{ > class Local : public Base {...}; > return new Local(); >}; Which proves that Local is defined on the library level, same as in Ada. The only difference is that C++ fakes you out, while Ada tells the sad truth. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de