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,5ee499d03212eed3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-08 21:10:43 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.rdc1.sfba.home.com.POSTED!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Dynamic dispatch again References: <3BC2475D.535D4E72@san.rr.com> X-Newsreader: Tom's custom newsreader Message-ID: <6Nuw7.17802$IY3.12247494@news1.rdc1.sfba.home.com> Date: Tue, 09 Oct 2001 04:10:42 GMT NNTP-Posting-Host: 24.7.82.199 X-Complaints-To: abuse@home.net X-Trace: news1.rdc1.sfba.home.com 1002600642 24.7.82.199 (Mon, 08 Oct 2001 21:10:42 PDT) NNTP-Posting-Date: Mon, 08 Oct 2001 21:10:42 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:13984 Date: 2001-10-09T04:10:42+00:00 List-Id: >approach to dynamically dispatching an entry to one of N different tasks If the bodies of the tasks are too heterogeneous, how about the calls on the tasks. Are there a small number of subroutines A, B, and C that do all the calls? Could you make an A that calls task One, and another A that is identical except that it replaces all references to One with references to Two, and so forth. Then use overloading to tell which A is being used. Or have a tagged type determine dynamically which A is to be used, and thus implicitly which task is to be called.