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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,100eb0a59892e906 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b38g2000prf.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: How to pass around access types to interfaces? Date: Fri, 31 Oct 2008 06:38:17 -0700 (PDT) Organization: http://groups.google.com Message-ID: <48a5ef39-4006-454b-8abe-c40e3178a8cd@b38g2000prf.googlegroups.com> References: <8bd7e8eb-b463-4dea-8b62-42b6486557f0@u65g2000hsc.googlegroups.com> <49086ff8$1@news.post.ch> NNTP-Posting-Host: 128.141.45.238 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1225460297 31715 127.0.0.1 (31 Oct 2008 13:38:17 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 31 Oct 2008 13:38:17 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b38g2000prf.googlegroups.com; posting-host=128.141.45.238; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.3) Gecko/2008092414 Firefox/3.0.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8265 Date: 2008-10-31T06:38:17-07:00 List-Id: On 29 Pa=BC, 15:15, Martin Krischik wrote: > Not the function call is the problem - the creation and storage of > objects is. > > For example: now are you going to fill a vector with > objects? This: vector > or this: http://www.boost.org/doc/libs/1_36_0/libs/ptr_container/doc/ptr_container.h= tml > And how do you delete those objects again? It's automagic. > This is where C++ lags. No, this is not a language issue - it is the question of standard library completeness. In this aspect both Ada and C++ lag terribly. I have to admit, though, that in the area of OO Ada solves one problem in a way that is really excellent - it has the ability to create and return Base'Class from a factory function without explicitly involving dynamic memory (extended return makes it even nicer). C++ cannot do that. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com Database Access Library for Ada: www.inspirel.com/soci-ada