Received: from eggs.gnu.org ([2001:4830:134:3::10]:39989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgvcW-0001YN-7C for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:11:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgvcQ-000097-B8 for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:11:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgvcQ-00008w-3f for qemu-devel@nongnu.org; Tue, 29 Sep 2015 10:10:58 -0400 From: Markus Armbruster References: <1443497249-15361-1-git-send-email-eblake@redhat.com> <1443497249-15361-15-git-send-email-eblake@redhat.com> Date: Tue, 29 Sep 2015 16:10:55 +0200 In-Reply-To: <1443497249-15361-15-git-send-email-eblake@redhat.com> (Eric Blake's message of "Mon, 28 Sep 2015 21:27:27 -0600") Message-ID: <87612tiads.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 14/16] qapi: Consistent generated code: minimize push_indent() usage List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: marcandre.lureau@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com, Michael Roth Eric Blake writes: > We had some pointless differences in the generated code for visit, > command marshalling, and events; unifying them makes it easier for > future patches to consolidate to common helper functions. > > This patch makes no difference to the generated code, but rather > focuses on reducing the number of push_indent()/pop_indent() pairs > so that generated code is typically already at its natural output > indentation in the python files. It is easier to reason about > generated code if the reader does not have to track how much > spacing will be inserted alongside the code, and moreso when all > of the generators use the same patterns (qapi-type and qapi-event > were already using in-place indentation). > > Signed-off-by: Eric Blake A few places become slightly less readable because the generated code is now indented lile the surrounding Python code. Other places become more readable. Having to think less about push_indent() / pop_indent() tips the balance, I guess. Have you diffed the generated code before and after the patch?