Re: Re: Objects with varying classes
Jim Fulton <[email protected]> Fri, 28 Sep 2018 11:23:51 -0600
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAPDm-FgLAutyz2vDCFea2OYHGnorSc_Vic9UyY_3Gw2tNJFzQw@mail.gmail.com> |
Certainly, any time you swap the class, the swap would have to be valid in the first place. Lots of opportunities to fail here. :) Jim On Fri, Sep 28, 2018 at 11:21 AM, Fred Drake <[email protected]> wrote: > On Fri, Sep 28, 2018 at 11:24 AM Jim Fulton <[email protected]> wrote: > > Conceivably, this is a use case we could support by swapping classes of > ghost objects when we detect a class mismatch. > > > > I'm not sure this is a use case we want to support though. Feels like a > foot gun. (I'd be open to hearing about problems it solves.) > > This would still be a problem when the memory sizes for the two types > don't match, which can change as code evolves. The allocations for > two classes might be the same during one invocation, and different in > a later invocation. While likely unusual, there would still be an > opportunity for things to fall apart when the object becomes a > non-ghost when switching the type. > > That may not be particularly significant, since there are already many > things that can go wrong then. > > > -Fred > > -- > Fred L. Drake, Jr. <fred at fdrake.net> > "A storm broke loose in my mind." --Albert Einstein > > -- > You received this message because you are subscribed to the Google Groups > "zodb" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Jim Fulton http://jimfulton.info -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.