On Mon, Jun 15, 2026 at 09:31:36AM +0100, Peter Maydell wrote:
> On Mon, 15 Jun 2026 at 09:13, Daniel P. Berrangé <[email protected]> wrote:
> > Do we know how many examples we have of embedding objects inside
> > another ?
> 
> It is an extremely common pattern for device and SoC model
> implementations; we've been recommending it for years.
> 
> > I would much prefer if we forbid the embedding of objects. It is
> > horrible design practice to have some QOM objects which can be
> > freed via reference count and some which cannot.
> 
> That would be a very large amount of code to rewrite to the
> new paradigm. I don't object inherently ("you have pointers to
> your child objects" works better when they might be implemented
> in Rust and might play better with being able to create
> machines and wire them up on the command line); I'm just
> noting how much work it would be if you wanted to make
> embedding forbidden.

Would it be a more tractable problem to "fix" object structure only
incrementally as they gain a need to be managed/reference from
Rust code, or does the Rust usage already implicitly extend too
broadly 

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to