Received: from eggs.gnu.org ([2001:4830:134:3::10]:49498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8p2B-0005hc-EI for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:30:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8p27-0006pK-8m for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:30:11 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:39042 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f8p27-0006pE-3p for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:30:07 -0400 From: Laszlo Ersek References: <20180417224054.26363-1-lersek@redhat.com> <762b3dc8-a86f-a21f-1e21-334ec46677ef@redhat.com> <20180418120320.GH27579@redhat.com> Message-ID: <77256bc4-fa52-ff4a-0672-ce743768b1e6@redhat.com> Date: Wed, 18 Apr 2018 17:30:03 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , "=?UTF-8?Q?Daniel_P._Berrang=c3=a9?=" Cc: Paolo Bonzini , qemu-devel@nongnu.org, libvir-list@redhat.com, Alexander Graf , Ard Biesheuvel , David Gibson , Gary Ching-Pang Lin , Gerd Hoffmann , Kashyap Chamarthy , Markus Armbruster , Michael Roth , Michal Privoznik , Peter Krempa , Peter Maydell , Thomas Huth On 04/18/18 17:27, Laszlo Ersek wrote: > On 04/18/18 17:17, Eric Blake wrote: >> On 04/18/2018 07:40 AM, Laszlo Ersek wrote: >> >>> Is it guaranteed that lists in JSON keep the order of the elements? >>> Because, dictionaries definitely don't promise any ordering between the >>> keys. >> >> Yes, JSON lists preserve order (and we have to explicitly document cases >> where order within a list is not significant). >> > > Thanks. > > After digesting the comments on @type for a while longer, from Dan, Gerd > and Paolo, I think we *should* keep @type, but rather than having it be > a simple enum, let's make it a list of enums, where order matters. Keep > @features separate, and document that order does not matter there. > > Here's why: my brain is crashing trying to come up with a > human-parseable explanation why for *some* entries in @features, their > relative order is important, and why for some others, it isn't. > Discerning the subset for which order matters, from any specific > grab-bag of @features, will be no fun for the human user. > > Given that the "ordered features" idea was brought to life solely > because a firmware can provide multiple interfaces (with a strong > preference order between them), I guess we might as well be honest about > that, and update @type accordingly. > > Thoughts? :) I mean I realize I just reinvented Paolo's point from :) I don't intend to claim the idea, I just needed some time to understand it. Laszlo