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,c406e0c4a6eb74ed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.cs.univ-paris8.fr!informatik.uni-bremen.de!cs.tu-berlin.de!uni-duisburg.de!not-for-mail From: Georg Bauhaus Newsgroups: comp.lang.ada Subject: Re: ADA Popularity Discussion Request Date: Sat, 28 Aug 2004 18:07:12 +0000 (UTC) Organization: GMUGHDU Message-ID: References: <49dc98cf.0408110556.18ae7df@posting.google.com> <1093634083.931713@master.nyc.kbcfp.com> NNTP-Posting-Host: l1-hrz.uni-duisburg.de X-Trace: a1-hrz.uni-duisburg.de 1093716432 5465 134.91.1.34 (28 Aug 2004 18:07:12 GMT) X-Complaints-To: usenet@news.uni-duisburg.de NNTP-Posting-Date: Sat, 28 Aug 2004 18:07:12 +0000 (UTC) User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (HP-UX/B.11.00 (9000/800)) Xref: g2news1.google.com comp.lang.ada:3120 Date: 2004-08-28T18:07:12+00:00 List-Id: Kevin Cline wrote: : Hyman Rosen wrote in message news:<1093634083.931713@master.nyc.kbcfp.com>... :> :> No fair picking an easy one. Suppose you have a vector of complex numbers and :> want to set the real part of each to zero. That's far from a one liner in C++ :> even though it's conceptually trivial. : With boost::lambda, it would be a one liner: : for_each(v.begin(), v.end(), _1.r = 0); With Ada 200Y there is "procedure Set_Re (X : in out Complex_Vector; Re : in Real_Vector); procedure Set_Im (X : in out Complex_Vector; Im : in Real_Vector); Each procedure replaces the specified (cartesian) component of each of the components of X by the value of the matching component of Re or Im; the other (cartesian) component of each of the components is unchanged. Constraint_Error is raised if X'Length is not equal to Re'Length or Im'Length." I think no one will deny that there is power in C++ template computing, and in CLOS makros etc. (Hey, lambda is cool!) How many specials like _1, embedded languages, and coding conventions are desirable? When does code suffer from abbreviation? What about compiler error messages involving deeply nested template instantiations? When people complain about explicit instantiations, for example about the necessity to express their choices of characteristics of a Booch Collection using three explicit instantiations, what is the complaint about? I think that once you have understood the model, and have learned to appreciate the why and how, it is no longer an issue. So the complaint might be about - the need to understand the model. - the need to be explicit. - the need to choose rather than relying on an implicit default. - the need to type rather than having a number of thoughts be condensed in very few characters. - ... Hm. Why do they still write "for_each(v.begin(), v.end," so frequently? :-) -- Georg