From: Jere <jhb.chat@gmail.com>
Subject: Re: Extending a third party tagged type while adding finalization
Date: Sat, 2 Dec 2017 18:22:05 -0800 (PST)
Date: 2017-12-02T18:22:05-08:00 [thread overview]
Message-ID: <60c0eabe-7b77-43d4-95da-fe87df70d6c2@googlegroups.com> (raw)
In-Reply-To: <9ffe40c0-59a6-408e-8104-6dcfea319366@googlegroups.com>
On Tuesday, November 28, 2017 at 6:48:10 AM UTC-5, AdaMagica wrote:
> Am Montag, 27. November 2017 20:53:59 UTC+1 schrieb Jere:
> >
> > The output for this is:
> > Initialize C1
> > Initialize Final
> > Initialize C2
> > Starting
> > Finalize C2
> > Finalize Final
> > Finalize C1
> >
> > which is the same thing I was seeing with my version. Final is initialized
> > before C2 and C2 is finalized before Final.
>
> Yes, that's a side effect of the selfreference. Too bad.
>
Yes indeed. This is why I initially said it couldn't be done safely. The
self reference + dispatch causes out of order initialization and
finalization. It can be done safely in specific cases, but not
in general. I got this result from both my initial code and using the
code from your paper. It makes sense now that I have had time to
think about it more. Basically, I can add Initialization and
Finalization to a descendant, but I cannot do so in a manner that
further descendants can safely inherit it. I have to add it to each
descendant manually (and avoid the classwide self reference) to keep safety.
next prev parent reply other threads:[~2017-12-03 2:22 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 12:43 Extending a third party tagged type while adding finalization Jere
2017-11-22 16:42 ` AdaMagica
2017-11-26 17:33 ` Jere
2017-11-26 18:15 ` Dmitry A. Kazakov
2017-11-26 19:31 ` Jere
2017-11-27 9:46 ` AdaMagica
2017-11-27 12:56 ` Jere
2017-11-27 15:00 ` AdaMagica
2017-11-27 16:38 ` Jere
2017-11-27 18:37 ` AdaMagica
2017-11-27 19:53 ` Jere
2017-11-28 11:48 ` AdaMagica
2017-12-03 2:22 ` Jere [this message]
2017-12-03 21:53 ` Robert Eachus
2017-12-04 7:58 ` Dmitry A. Kazakov
2017-12-04 14:59 ` Robert Eachus
2017-12-04 15:39 ` Dmitry A. Kazakov
2017-11-27 18:10 ` Shark8
2017-11-27 19:56 ` Jere
2017-11-28 1:55 ` Randy Brukardt
2017-12-03 2:47 ` Jere
2017-12-03 9:29 ` Dmitry A. Kazakov
2017-12-03 15:10 ` AdaMagica
2017-12-03 16:39 ` Dmitry A. Kazakov
2017-12-03 19:34 ` AdaMagica
2017-12-03 19:41 ` Dmitry A. Kazakov
2017-12-04 12:38 ` AdaMagica
2017-12-04 13:19 ` AdaMagica
2017-12-04 13:55 ` Dmitry A. Kazakov
2017-12-04 15:44 ` AdaMagica
2017-12-04 16:19 ` Dmitry A. Kazakov
2017-12-04 20:54 ` Randy Brukardt
2017-12-04 21:02 ` Dmitry A. Kazakov
2017-12-05 21:09 ` Randy Brukardt
2017-12-05 21:29 ` Dmitry A. Kazakov
2017-12-07 1:13 ` Randy Brukardt
2017-12-07 8:36 ` Dmitry A. Kazakov
2017-12-07 23:22 ` Randy Brukardt
2017-12-08 9:30 ` Dmitry A. Kazakov
2017-12-09 0:17 ` Randy Brukardt
2017-12-11 9:03 ` Dmitry A. Kazakov
2017-12-11 22:42 ` Randy Brukardt
2017-12-12 16:11 ` AdaMagica
2017-12-12 20:08 ` G. B.
2017-12-12 20:32 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox