comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Krischik <krischik@users.sourceforge.net>
Subject: Re: Ada 95 constructors on limited types
Date: Wed, 02 Jan 2008 19:36:13 +0100
Date: 2008-01-02T19:36:13+01:00	[thread overview]
Message-ID: <1379898.fuxZSb5qdF@linux1.krischik.com> (raw)
In-Reply-To: 08dc2b30-6c8c-4cff-9f2e-c0d4c377972d@i3g2000hsf.googlegroups.com

shaunpatterson@gmail.com wrote:

> I am trying to write a constructor that will return an access type to
> a new object.

Three month into learning Ada I removed 90% of all access types from my code
because I discovered that access types are seldom needed in Ada.

Read;

http://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation#The_class-wide_type

> type Class_Access is access all Class'Class;

Do you need that "all"? Because because the "all" does not come for free -
there are some penalties.

Read:

http://en.wikibooks.org/wiki/Ada_Programming/Types/access#Access_vs._access_all

Apart from that Dimity answered your question.

Regards

Marin
-- 
mailto://krischik@users.sourceforge.net
Ada programming at: http://ada.krischik.com



  parent reply	other threads:[~2008-01-02 18:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-02 14:31 Ada 95 constructors on limited types shaunpatterson
2008-01-02 14:49 ` Dmitry A. Kazakov
2008-01-02 16:02 ` Robert A Duff
2008-01-02 16:20 ` Jeffrey R. Carter
2008-01-02 22:57   ` Brian May
2008-01-02 23:53     ` Jeffrey R. Carter
2008-01-05 10:32     ` Ludovic Brenta
2008-01-05 14:59       ` Robert A Duff
2008-01-08  1:58         ` Randy Brukardt
2008-01-02 18:36 ` Martin Krischik [this message]
2008-01-04  1:38   ` Randy Brukardt
replies disabled

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