Eduardo Habkost <ehabk...@redhat.com> writes:

> Based-on: 20201104160021.2342108-1-ehabk...@redhat.com
> Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-qlit-defaults
>
> This extend qlit.h to support all QNum types (signed int,
> unsigned int, and double), and use QLitObject to represent field
> property defaults.
>
> It allows us to get rid of most type-specific .set_default_value
> functions for QOM property types.

What's left?

I'm asking because if you create a new way to get rid of most of an old
way, you're still left with two ways, which may or may not be an
improvement.

Moving defaults from code to data sounds attractive to me.  Data is
easier to reason about than code.  For QAPI, we've been talking about
defining defaults in the schema for a long time, but nobody has gotten
around to finish an implementation.


Reply via email to