Re: Re: Objects with varying classes
Fred Drake <[email protected]> Fri, 28 Sep 2018 13:21:52 -0400
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <CAFT4OTFy7cXpCwvRKtpSrkX+H1LNgZ4gy4CNh15MLkqBE1zi8w@mail.gmail.com> |
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.