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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b14a804025dceb20 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-10-29 20:02:38 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!cyclone.bc.net!newsfeed.bc.tac.net!news.bc.tac.net!not-for-mail Sender: blaak@TORUS Newsgroups: comp.lang.ada Subject: Re: Constructors/Destructors in Ada95 References: <8ti9lp$7se$1@nnrp1.deja.com> From: Ray Blaak Message-ID: Organization: The Transcend X-Newsreader: Gnus v5.6.42/Emacs 19.34 Date: 29 Oct 2000 20:03:13 -0800 NNTP-Posting-Host: 209.53.149.68 X-Complaints-To: news@bctel.net X-Trace: news.bc.tac.net 972878542 209.53.149.68 (Sun, 29 Oct 2000 20:02:22 PST) NNTP-Posting-Date: Sun, 29 Oct 2000 20:02:22 PST Xref: supernews.google.com comp.lang.ada:1623 Date: 2000-10-29T20:03:13-08:00 List-Id: rwilson007007@my-deja.com writes: > If I desired to mimic the C++ notion of classes in Ada, I would be tempted > to encapsulate a tagged record instance within a generic package [...] > That is, rather than being tempted to overload Ada's assignment > operator, I would prefer to replace: > "My_Object = new My_Class_Name (Argument_List)" in C++ > with > "package My_Object is new My_Class_Name.Instance (Argument_List)" > in Ada (see example below...). The main problem with this approach is that packages are not first class objects in Ada. They do not have addresses, cannot be passed as parameters or compared to each other, etc. Packages are static namespaces. -- Cheers, The Rhythm is around me, The Rhythm has control. Ray Blaak The Rhythm is inside me, blaak@infomatch.com The Rhythm has my soul.