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: g2news2.google.com!news4.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!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 11:15:08 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx01.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="6513"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18mv+5cp/FkvIJclLgtpLwsznKzoo+RW00=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:8UhpzgxpQ5Jqdhf8/jqavmSzPfs= sha1:PUOTR6QuxTkT+BL9nTkS/d1yubs= Xref: g2news2.google.com comp.lang.ada:19506 Date: 2011-03-28T11:15:08+01:00 List-Id: How is the Event_Queue going to know which instance of State_Type to pass to a call of Handle (State, Event)? Could the same State instance be passed to more than one Event_Queue? Will you really be using different State_Types? (just checking.) You could try constraining an Event_Queue by "access State_Type'Class". Should State_Type be tagged as well as Event_Type? (I realise this ends up double-dispatching in Handle, would need to be class-wide in - probably - State_Type.) I think that with this sort of problem you are going to have to bite the bullet and use access and controlled types (well, controlled if you are going to delete queues. If not, why bother?)