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,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.news.atl.earthlink.net.POSTED!14bb18d8!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) References: <41547dae$0$91007$39cecf19@news.twtelecom.net> <41583b4c$0$74190$39cecf19@news.twtelecom.net> From: Matthew Heaney Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 29 Sep 2004 03:50:16 GMT NNTP-Posting-Host: 64.185.133.124 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1096429816 64.185.133.124 (Tue, 28 Sep 2004 20:50:16 PDT) NNTP-Posting-Date: Tue, 28 Sep 2004 20:50:16 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:4358 Date: 2004-09-29T03:50:16+00:00 List-Id: kevin.cline@gmail.com (Kevin Cline) writes: > Matthew Heaney wrote in message > news:... > > > > You're still confused. The local subprograms are analogous to STL > > binders and function objects. The generic part is Generic_Op. The rest > > is just glue. > > But 14 lines of glue for every different array type that I want to use > with Generic_Op? That's the sort of repetition that turned me away > from Ada in the first place. You're still confused. The "unnecessary code" typically includes up-level references to entities in the enclosing scope, e.g. procedure Op (C : CT) is Sum : Integer'Base := 0; procedure Add_E_To_Sum (E : Natural) is begin Sum := Sum + E; end; begin C.Iterate (Sum'Access); ... --do something with Sum end Op; > I like languages where I can say what I want, and only have to say it > once. I don't like languages where I have to cut and paste endless > variations of boilerplate code. For that reason I like C++ and Perl > and LISP and don't like Ada and Java and C#. That's just swell.