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,FREEMAIL_FROM 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!news2.google.com!proxad.net!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "Robert Kawulak" Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: Wed, 29 Sep 2004 01:26:39 +0200 Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: <41547dae$0$91007$39cecf19@news.twtelecom.net> <1g2d9xmnita9f.5ecju0eftkqw$.dlg@40tude.net> <87u4rkhddelw$.1uuoqhfyd2eay$.dlg@40tude.net> NNTP-Posting-Host: pe29.krakow.cvx.ppp.tpnet.pl X-Trace: nemesis.news.tpi.pl 1096452468 20113 213.76.40.29 (29 Sep 2004 10:07:48 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Wed, 29 Sep 2004 10:07:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:4369 Date: 2004-09-29T01:26:39+02:00 List-Id: Hi, > First, that all will be templates, I do not want them, generics are > inherently bad. For instance, it is impossible to have generic programming > on containers of containers. You cannot have a list of items of "array" > types that are different instantiations. I don't know about Ada, but in C++ you can, and such "templates nesting" is even the recommended way to have multi-dimensional vectors: typedef vector< vector < vector > > vector_int_3D; > Secondly it is not checked whether the thing you are implementing *is* an > array which *will* work with all that standard algorithms. You never know > before you instantiate. > Ideologically, it is stone age, not the Ada's way, > IMO. C++ templates are not checked only when instantiated. Every template body is parsed, whether it's instantiated anywhere or not (this is why there is the typename keyword). That's as to grammar correctness. And if you mean semantics, I don't thing Ada compiler will check them for you as well... You also have to write some program using generic instantiations to test whether they work as you expect them to do. Best regards, Robert