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,5dacec64c8c879fa X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.226.10 with SMTP id ro10mr15255224pbc.6.1328653407155; Tue, 07 Feb 2012 14:23:27 -0800 (PST) Path: lh20ni271968pbb.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Preventing Unchecked_Deallocation? Date: Tue, 07 Feb 2012 22:23:26 +0000 Organization: A noiseless patient Spider Message-ID: References: <33a35da4-6c3e-4ab4-b58f-a9d73565d79a@t30g2000vbx.googlegroups.com> <4350713b-6ac3-4b22-b221-8da2bac52fea@t5g2000yqk.googlegroups.com> <26e4f2a4-edae-4e37-8697-f2390e636a21@z31g2000vbt.googlegroups.com> <07915db7-0e84-4eb5-af69-ee31e10b018f@db5g2000vbb.googlegroups.com> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="21190"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19kgzmdd/sa8MYMv6JROk5/HBvYDIJQfMs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:WWmjd1Q+HpX5W4MA4SLWkCHGRWs= sha1:GjHNMZd1DW20tiwvZ4krMyjoWNs= Content-Type: text/plain; charset=us-ascii Date: 2012-02-07T22:23:26+00:00 List-Id: Robert A Duff writes: > In Ada, you need pointers if you want to create linked heap-allocated > data structures. In the kinds of program I write, that happens often. > You also need pointers if you want to implement size-changing objects. > Not for much else. In order to represent a UML model, I needed limited objects to represent the elements in the model (instances of Class, DataType, Association, Operation, Parameter etc) and I wanted to store them in Maps keyed by name. I didn't see any choice but to use maps of (name -> access element'class).