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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: OO problem: Performing actions on messages (very long, sorry) Date: Mon, 10 Jan 2005 15:22:22 +0100 Organization: cbb software GmbH Message-ID: <1gsktm8wimsc$.1o2yngarlww9s$.dlg@40tude.net> 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> <1105346564.204857.53640@c13g2000cwb.googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net TANsFm3tGVVhGtEgM3KOhAOZ4sXWdd9JPSYzL8kZXfda3xA3o= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:7608 Date: 2005-01-10T15:22:22+01:00 List-Id: On 10 Jan 2005 00:42:44 -0800, per wrote: >>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. The reaction could be "Access violation" (:-)) It is utterly untyped, or non-OO, I should say. So it looks not very promising to to solve it using OO. I still have an impression that you should return back to domain analysis and find better objects than mysterious actions and messages. At least there should be no place for the word "any". >>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) So you schedule actions on something that even does not exist. It is a bit strange. Normally scheduling depends on some state of *existing* scheduled items. Probably this unconventional use of terms message and action is the source of the misunderstanding. Aren't messages used to invoke actions? Aren't scheduled actions invoked by messages from a scheduler? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de