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,2fa4069595cb9ef7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Breaking a circularity Date: Mon, 28 Mar 2011 12:37:12 +0100 Organization: A noiseless patient Spider Message-ID: References: <5aac3e2d-a382-479e-90a3-8acd846ca204@o21g2000prh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="29532"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wSYp+QlbK/yKp6ZaB+c1CAKOIsp2sDG4=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:hiy5mKR6rNKHXdGgz/qIzRNq45s= sha1:4VvPJtXe8ODl1ZelqW3360CNbyI= Xref: g2news1.google.com comp.lang.ada:18539 Date: 2011-03-28T12:37:12+01:00 List-Id: Ludovic Brenta writes: > BTW, why does Event_Type have to be limited? If it weren't limited, > you would not need Event_Ptr_Type. Also, why does it have to be > abstract? When I made my events limited, it was because any two events are different. In this case, we have type Event_Type is abstract record Id : Positive; Time : Time_Type; end record; so it probably won't make any sense for an Event to be copyable (what would Id be in the copy?). Of course the events could be privately nonlimited. I do wonder what Id is _for_. You'll certainly need pointers somewhere, because Event_Type instances have to be held in the Queue. Indefinite_Ordered_Sets might do the trick, though. It would save the bother of having Handle deallocate the Event.