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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e429176c9adb07b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-20 04:41:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: [OT] Best way to isolate a GUI? (The final concensous?) Date: Thu, 20 Feb 2003 07:40:02 -0500 Organization: MindSpring Enterprises Message-ID: References: <3E511C15.1040404@acm.org> <3E5121BD.4010200@cogeco.ca> <3E51A55A.3000101@cogeco.ca> <3E52A1BF.1020809@cogeco.ca> <3E53CE60.1030008@cogeco.ca> NNTP-Posting-Host: d1.56.a0.36 X-Server-Date: 20 Feb 2003 12:41:43 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Xref: archiver1.google.com comp.lang.ada:34269 Date: 2003-02-20T12:41:43+00:00 List-Id: I'd put the case statement part in the "Nice to have" category rather than view it as the loss of some essential capability. Most of what you get there is likely to be dealt with by dispatching & the rest is more of an inconvenience than anything else. I'd agree that you don't want to totally rule out variant records.It is a foolish design rule to say "Thou shalt not use feature X - ever." I'd simply base the thing on tagged records and as the design evolved if circumstances made it look like a variant might be a good answer, go ahead and create one. My strategy would be tagged records, but I might use a tactic of a variant occasionally. As for callbacks - I'd rather not see that at all. One or more message queues would seem more elegant to me. Maybe that's just me, but callbacks seem like some version of a computed goto - I've got to give you intimate knowledge of the inside of my code (plus, structure my code according to your whims) when I'd rather just have you send me data and let me figure out what to do with it. MDC -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/ Send Replies To: m c o n d i c @ a c m . o r g "Going cold turkey isn't as delicious as it sounds." -- H. Simpson ====================================================================== Warren W. Gay VE3WWG wrote in message news:3E53CE60.1030008@cogeco.ca... > > Tagged records need not be the final answer to all things event wise > however. Doing a case statement on a discriminant of a variant record > is easier than doing a number of "if object in Some'Class then" > tests. Especially if there is a common set of elements and some > variations for the event in question. > > So my concession is this: > > 1) Use tagged types for event data (with a abstract or bare "base" type). > 2) Extend the event base type in the package specs as required > 3) Callback is defined as receiving some Base'Class argument. > 4) Within the final tagged type, perhaps use variant records to > distinguish variations of that event. >