From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhebK-00039O-Tl for qemu-devel@nongnu.org; Tue, 06 May 2014 08:36:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhebE-0003eH-FA for qemu-devel@nongnu.org; Tue, 06 May 2014 08:36:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhebE-0003e7-7M for qemu-devel@nongnu.org; Tue, 06 May 2014 08:35:56 -0400 Message-ID: <5368D725.3080109@redhat.com> Date: Tue, 06 May 2014 06:35:49 -0600 From: Eric Blake MIME-Version: 1.0 References: <1398764656-27534-1-git-send-email-famz@redhat.com> <1398764656-27534-3-git-send-email-famz@redhat.com> <8761lktrg3.fsf@blackfin.pond.sub.org> <5367ABE0.6040104@redhat.com> <87iopkdt9g.fsf@blackfin.pond.sub.org> <536818AA.50101@redhat.com> <874n131ba8.fsf@blackfin.pond.sub.org> In-Reply-To: <874n131ba8.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fLOa6peUQwMXTpJOvhHPUbt4awm15QHrk" Subject: Re: [Qemu-devel] [PATCH v2 2/2] qapi: Allow setting default values for optional parameters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Peter Maydell , Fam Zheng , qemu-devel@nongnu.org, Michael Roth , Luiz Capitulino , akong@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fLOa6peUQwMXTpJOvhHPUbt4awm15QHrk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/06/2014 03:55 AM, Markus Armbruster wrote: >> Keeping the input file easy to write, and more compact than what >> introspection will output, is a fine tradeoff in my book (easier to >> maintain if there is less to type; while still having a well-defined >> conversion to the formal output form). >=20 > Unlike the other sugared form, this one adds syntax beyond JSON, namely= > in some (but not all) member names, and that makes it a bit harder to > stomach for me. JSON has no requirement that a 'name':'value' object limit the 'name' portion to just valid identifier characters. But I do see your point about the fact that we are parsing a sigil of '*' as the first character of 'name' as sugar. >=20 > Whether it's worthwhile depends on how common the case "optional, no > default" turns out to be. Wait and see. It's already VERY common - every optional variable already uses the syntax. The question is rather: how many optional variables will be rewritten to express a default value, vs. those that can be left alone because the default value is good enough. A global search-and-replace could rewrite the entire file to the new syntax for optional variables, and we could enforce the new more verbose style going forward, but is the churn worth it? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fLOa6peUQwMXTpJOvhHPUbt4awm15QHrk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTaNclAAoJEKeha0olJ0Nqz0cH+wQ9GV9zi2lf5drqvXJ1JIkN dU1NS62sieayhqHCjh8N79yFxWSjLoocQTIEbisyOAiQLpmISSu15/2lCstHG2fa 3vbXWOv3Cl8hW6sI7JmKBNyexozwPFIdBL61QnhbZuzbgHQeEjdORekhPoJpvVRb Q2G6q56bB7gfCfBGOWdHR/i4cvbP38nZvfM47YNy50xmVCX2z5wUpXlXADria4Ne tY486K/zdykN+XBJ0MxwsFOiNotYznSVHwRKgwGkbCirfk/Gj8zIcBDjTMH8aBJQ qJmtrDyIizrLznoGJQ3Mzwl0GzfOkz2mATDq7hwSXPB0ceDtAhmUKn020wGwx58= =wmlO -----END PGP SIGNATURE----- --fLOa6peUQwMXTpJOvhHPUbt4awm15QHrk--