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,a8d137db7a5f6c81 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!c13g2000cwb.googlegroups.com!not-for-mail From: "per" Newsgroups: comp.lang.ada Subject: Re: OO problem: Performing actions on messages (very long, sorry) Date: 10 Jan 2005 00:42:44 -0800 Organization: http://groups.google.com Message-ID: <1105346564.204857.53640@c13g2000cwb.googlegroups.com> References: <1103723394.299024.314670@c13g2000cwb.googlegroups.com> <13465377.hrn0RlrJV7@linux1.krischik.com> <1103737351.196460.85450@f14g2000cwb.googlegroups.com> <1qdvdjid4u58v.1xz6j5ec6nfcy$.dlg@40tude.net> <1104755823.837077.74630@z14g2000cwz.googlegroups.com> <8oknh024yb43$.71qlyp6g8y2x$.dlg@40tude.net> <1104840326.160879.132400@c13g2000cwb.googlegroups.com> <1ogeykubpns90.2jnblmdu1wg2.dlg@40tude.net> <1104852099.054703.265080@f14g2000cwb.googlegroups.com> <1104926478.797780.7830@c13g2000cwb.googlegroups.com> <1odpvi9429wrb.r854wtzbr1qm$.dlg@40tude.net> <1104940745.420814.235130@f14g2000cwb.googlegroups.com> <1rall0nftkcsj$.1e5jj6uwwwezc.dlg@40tude.net> NNTP-Posting-Host: 138.14.239.132 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1105346567 14370 127.0.0.1 (10 Jan 2005 08:42:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 10 Jan 2005 08:42:47 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: c13g2000cwb.googlegroups.com; posting-host=138.14.239.132; posting-account=e84-wQ0AAADeDLnjH5yWqnRMVsJLfQJg Xref: g2news1.google.com comp.lang.ada:7601 Date: 2005-01-10T00:42:44-08:00 List-Id: >How do you plan to maintain data consistency of a message if the user may >arbitrarily override its fields? I would try to do it more OO. To think Well, that's the user's problem. Or rather, that's the point, sort of. See, this is a test equipment and shall enable modification of messages in "any" way in order to test how the test object (a computer) reacts. >about what can be done with a message. And consider action as an >implementation detail of a concrete type of messages. Then actions could >vanish. (Just a guess, I still can't tolerate both messages and actions in >one bottle. (:-)) > >> Can an action, eg Override_A, exist without an M1 instance to "point" >> at? > >It cannot, this is the whole idea of access discriminants. They are never >null and cannot be changed. Otherwise one should use access types >(pointers). > >> Action has a different life-cycle than Message. > >That's no problem as long as its life in Message's one. For exampe: > >declare > M : aliased M1; >begin > ... > declare > A : Override_A (M'Access); > begin > ... -- The scope of the action A is nested > end; > ... >end; How would you create a schedule of actions before any messages exist? (Schedule = Plan of what actions should be taken to what type of messages and when, created *before* any message instances exist)