Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-05 Thread Markus Armbruster
John Snow writes: > On 2/3/21 9:47 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> Presently, we use a tuple to attach a dict containing annotations >>> (comments and compile-time conditionals) to a tree node. This is >>> undesirable because dicts are difficult to strongly type; promot

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-05 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Feb 04, 2021 at 04:37:45PM +0100, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: >> >> John Snow writes: >> >> >> >> > Presently, we use a tuple to attach a dict containing annota

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-04 Thread Eduardo Habkost
On Thu, Feb 04, 2021 at 04:37:45PM +0100, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: > >> John Snow writes: > >> > >> > Presently, we use a tuple to attach a dict containing annotations > >> > (comments and compile

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-04 Thread John Snow
On 2/4/21 10:37 AM, Markus Armbruster wrote: Eduardo Habkost writes: On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: John Snow writes: Presently, we use a tuple to attach a dict containing annotations (comments and compile-time conditionals) to a tree node. This is undes

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-04 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: >> John Snow writes: >> >> > Presently, we use a tuple to attach a dict containing annotations >> > (comments and compile-time conditionals) to a tree node. This is >> > undesirable because dicts are di

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread John Snow
On 2/3/21 9:47 AM, Markus Armbruster wrote: John Snow writes: Presently, we use a tuple to attach a dict containing annotations (comments and compile-time conditionals) to a tree node. This is undesirable because dicts are difficult to strongly type; promoting it to a real class allows us to n

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread Eduardo Habkost
On Wed, Feb 03, 2021 at 03:47:36PM +0100, Markus Armbruster wrote: > John Snow writes: > > > Presently, we use a tuple to attach a dict containing annotations > > (comments and compile-time conditionals) to a tree node. This is > > undesirable because dicts are difficult to strongly type; promoti

Re: [PATCH v4 08/14] qapi/introspect.py: create a typed 'Annotated' data strutcure

2021-02-03 Thread Markus Armbruster
John Snow writes: > Presently, we use a tuple to attach a dict containing annotations > (comments and compile-time conditionals) to a tree node. This is > undesirable because dicts are difficult to strongly type; promoting it > to a real class allows us to name the values and types of the > annot