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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!colt.net!peernews3.colt.net!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: Sat, 25 Sep 2004 16:17:34 +0200 Organization: AdaCL Message-ID: <1219289.a4UNLEWChh@linux1.krischik.com> References: <13bv1aau5q9ht.1fr6ixcdql72.dlg@40tude.net> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.t-online.com 1096127777 03 18875 pnEjXxavbKyXSd1q 040925 15:56:17 X-Complaints-To: usenet-abuse@t-online.de X-ID: TF-fHUZVQepGM1LnkTal3pxXLEjYAw1T4Ln66cWwiVjbDCLrFbKrcM User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:4180 Date: 2004-09-25T16:17:34+02:00 List-Id: Dmitry A. Kazakov wrote: > On Fri, 24 Sep 2004 13:47:52 GMT, Matthew Heaney wrote: > >> And the reason why we have to write the subpgram is because Ada doesn't >> give you any direct way of returning a reference to variable view from a >> function, as C++ does. But even so, in Ada you can modify objets in >> place (in AI-302 by using a downward closure -- which C++ doesn't have). >> That's what really matters, not the syntax. > > Syntax does not matter. What matters is an ability to express an idea in > the syntax you want. To me, the most natural syntax for modifying an array > element is A(I) := B; True. But only if it works. I just had some fun reading the fineprint from std::vector::operator [] (can not insert new elements - and at least the MS version crashes deep inside library code when you try) and std::map::operator [] (no const version). If it does not work as expected I rather live without and use an Insert () which then does work as expected. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com