comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: How to pass around access types to interfaces?
Date: Fri, 31 Oct 2008 06:38:17 -0700 (PDT)
Date: 2008-10-31T06:38:17-07:00	[thread overview]
Message-ID: <48a5ef39-4006-454b-8abe-c40e3178a8cd@b38g2000prf.googlegroups.com> (raw)
In-Reply-To: 49086ff8$1@news.post.ch

On 29 Paź, 15:15, Martin Krischik <krisc...@users.sourceforge.net>
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<base_class&> with
> objects?

This:

vector<shared_ptr<base_class> >

or this:

http://www.boost.org/doc/libs/1_36_0/libs/ptr_container/doc/ptr_container.html

> 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



  reply	other threads:[~2008-10-31 13:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-24 11:45 How to pass around access types to interfaces? Sven
2008-10-24 12:24 ` Niklas Holsti
2008-10-24 12:49   ` Sven
2008-10-24 13:55     ` Ludovic Brenta
2008-10-24 21:32 ` sjw
2008-10-25  8:54   ` Sven
2008-10-25 15:43 ` Martin Krischik
2008-10-25 22:15   ` Robert A Duff
2008-10-26  8:02     ` Dmitry A. Kazakov
2008-10-26 15:50     ` Martin Krischik
2008-10-28 13:41       ` Maciej Sobczak
2008-10-29 14:15         ` Martin Krischik
2008-10-31 13:38           ` Maciej Sobczak [this message]
2008-10-31 14:46             ` Dmitry A. Kazakov
2008-10-29 12:42   ` Sven
2008-10-29 13:17     ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox