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!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: Fri, 1 Oct 2004 09:55:39 +0200 Message-ID: <2n0j0jfe6sex.2bcfi09ss44w$.dlg@40tude.net> References: <41547dae$0$91007$39cecf19@news.twtelecom.net> <1g2d9xmnita9f.5ecju0eftkqw$.dlg@40tude.net> <87u4rkhddelw$.1uuoqhfyd2eay$.dlg@40tude.net> <6zobtdp3ckqx.plmvz5og15id.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de BgeXaZSer/5bEey0EWvBjQjjCwj43YKnYUFBO0rHrAjExkfTM= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:4490 Date: 2004-10-01T09:55:39+02:00 List-Id: On Thu, 30 Sep 2004 20:52:21 +0200, Robert Kawulak wrote: >> What I meant is that you cannot have a vector >> containing elements of vector, vector, vector etc. >> vector and vector are unrelated types even if A is a descendant of B >> or related to B. What do you want from a macro extension? (:-)) > > Whoops! So in my answer for Matthew Heaney's post I've misunderstood you > again :-/ > But yes, it *is* possible to have such vector, similarly to my example > in mentioned answer (of course the code would need a few changes, it could > be even simplier). But I'm wondering what in the world would you need such a > vector for? ;-) It is no matter. The problem is fundamental, if vector and vector as types have nothing in common, then it is difficult to write a program which can work with both. It is all about generic programming. That is not necessarily programming using generics or templates, that is programming with *sets* of types. Array types is an example of such set, "vector<>" is another. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de