[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the siz
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table |
Date: |
Fri, 04 Jan 2019 10:31:11 +0100 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Thu 03 Jan 2019 10:42:30 PM CET, Eric Blake wrote:
> In my view, code generators make sense when used on code that is
> expected to change over time (a good example is QAPI because we add
> new commands every release; other places might be a generator to help
> deal with syscall handlers since newer kernels can add a syscall; or
> even the fact that we have used some powerful GNU make textual
> processing to make it easy to add files to particular subsets of the
> build with as few lines edited as possible), where the goal is that
> the generator gives you both a compact representation that is easier
> to edit, and that the expansion from the generator ensures that
> repetitive boilerplate is formed without typos. In short, if a
> generator results in a net reduction in lines of edited source in
> relation to the lines it produces, AND if the source that gets
> regenerated is likely to change, then it makes total sense to spend
> time on the generator. But when the amount of effort to write a
> generator costs as much as just hard-coding the list outright,
> especially when the list is not going to change (there really aren't
> any other powers of 2 within 64 bits), I'm not sure a generator adds
> any value.
I agree with Eric.
Berto
- [Qemu-block] [PATCH 0/1] include: Auto-generate the sizes lookup table, Leonid Bloch, 2019/01/02
- [Qemu-block] [PATCH 1/1] include: Auto-generate the sizes lookup table, Leonid Bloch, 2019/01/02
- Re: [Qemu-block] [PATCH 1/1] include: Auto-generate the sizes lookup table, Philippe Mathieu-Daudé, 2019/01/03
- Re: [Qemu-block] [PATCH 1/1] include: Auto-generate the sizes lookup table, Alberto Garcia, 2019/01/03
- Re: [Qemu-block] [PATCH 1/1] include: Auto-generate the sizes lookup table, Leonid Bloch, 2019/01/03
- Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table, Eric Blake, 2019/01/03
- Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table, Leonid Bloch, 2019/01/03
- Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table, Eric Blake, 2019/01/03
- Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table,
Alberto Garcia <=
- Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table, Leonid Bloch, 2019/01/04