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,adae40bcc4d01baf X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail Message-ID: <1379898.fuxZSb5qdF@linux1.krischik.com> From: Martin Krischik Subject: Re: Ada 95 constructors on limited types Newsgroups: comp.lang.ada Date: Wed, 02 Jan 2008 19:36:13 +0100 References: <08dc2b30-6c8c-4cff-9f2e-c0d4c377972d@i3g2000hsf.googlegroups.com> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@hispeed.ch Organization: hispeed.ch NNTP-Posting-Host: 84.75.162.66 (84.75.162.66) NNTP-Posting-Date: Thu, 03 Jan 2008 07:00:10 +0100 X-Trace: e53dc477c79eaf1ee07e724555 Xref: g2news1.google.com comp.lang.ada:19165 Date: 2008-01-02T19:36:13+01:00 List-Id: 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