[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 05/16] qapi: centralize is_[user|system|builtin]_module me
From: |
John Snow |
Subject: |
Re: [PATCH v4 05/16] qapi: centralize is_[user|system|builtin]_module methods |
Date: |
Tue, 2 Feb 2021 11:05:43 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/2/21 4:16 AM, Markus Armbruster wrote:
Putting these functions into a class feels awkward. But it does the
job.
Yes, I recognize that. I really wanted:
1) To centralize them somewhere, so there was somewhere obvious to look
for these definitions, but
2) We aren't really using the classiness in a meaningful way, so
3) The names are a little awkward as you mentioned.
We can rewrite them as functions if you want, maybe with a comment for
the class that says "Hey, go look at these functions!" but that didn't
feel less messy to me. I couldn't really find anything that I actually
genuinely liked. I went with a subjective least-worst.
--js
- Re: [PATCH v4 07/16] qapi: use explicitly internal module names, (continued)
[PATCH v4 10/16] qapi: centralize the built-in module name definition, John Snow, 2021/02/01
[PATCH v4 09/16] qapi/gen: Combine ._add_[user|system]_module, John Snow, 2021/02/01
[PATCH v4 12/16] qapi/gen: Support for switching to another module temporarily, John Snow, 2021/02/01
[PATCH v4 11/16] qapi/gen: write _genc/_genh access shims, John Snow, 2021/02/01
[PATCH v4 13/16] qapi/commands: Simplify command registry generation, John Snow, 2021/02/01
[PATCH v4 14/16] qapi/gen: Drop support for QAPIGen without a file name, John Snow, 2021/02/01
[PATCH v4 05/16] qapi: centralize is_[user|system|builtin]_module methods, John Snow, 2021/02/01
[PATCH v4 16/16] qapi: enable strict-optional checks, John Snow, 2021/02/01
[PATCH v4 15/16] qapi: type 'info' as Optional[QAPISourceInfo], John Snow, 2021/02/01
[PATCH v4 08/16] qapi: use './builtin' as the built-in module name, John Snow, 2021/02/01
Re: [PATCH v4 00/16] qapi: static typing conversion, pt1.5, Markus Armbruster, 2021/02/02