qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Eric Blake" <eblake@redhat.com>,
	qemu-devel@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/2] qapi: Rename .json to .qapi
Date: Fri, 20 Apr 2018 10:27:01 +0100	[thread overview]
Message-ID: <20180420092700.GC2533@work-vm> (raw)
In-Reply-To: <87d0yu1dj1.fsf@dusky.pond.sub.org>

* Markus Armbruster (armbru@redhat.com) wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
> > Our QAPI input files aren't quite true JSON (comments being one obvious
> > difference); naming things .json doesn't make that obvious.  Use a new
> > suffix .qapi that makes it easy to identify our files.
> 
> I agree that .json is sub-optimal.  Evidence: we add Emacs file
> variables to get Python mode, because that's less wrong than JavaScript
> mode.  Except for "trivial" files, where we can't be bothered.
> 
> The rename lessens the human confusion, but increases the Editor
> confusion somewhat: we get Fundamental mode for "trivial" files, which
> is more wrong than JavaScript mode.
> 
> One way to avoid that would be adding file variables to all files.

That depends on your editor;  this rename makes life **much** better
in vim;   with them as .json files they display with white text on
bright red background (I guess because it's upset by syntax somewhere)
but as .qapi files it's readable (I'm not entirely sure which syntax
it's using)

Dave

> Permit me to digress.  I figure the (sane part of the) rationale for
> picking JSON as programming language syntax was "do not invent syntax,
> do profit from existing tooling".  Except JSON is unfit for the purpose
> as is; you need at least comments.  Our "fixes" for "unfit" turned the
> thing into an original work, destroying the "profit" part.  To
> paraphrase a German saying, what we built with our hands we upset with
> the ass.  Too late to correct, I guess, but I'm open to different
> opinions.
> 
> [...]
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2018-04-20  9:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 22:31 [Qemu-devel] [PATCH v2 0/2] QAPI file renames Eric Blake
2018-04-19 22:31 ` [Qemu-devel] [PATCH v2 1/2] qapi: Rename QMP and QGA schema files Eric Blake
2018-04-20  8:01   ` Markus Armbruster
2018-04-20 12:42     ` Eric Blake
2018-04-19 22:31 ` [Qemu-devel] [PATCH v2 2/2] qapi: Rename .json to .qapi Eric Blake
2018-04-20  8:35   ` Markus Armbruster
2018-04-20  9:27     ` Dr. David Alan Gilbert [this message]
2018-04-20 13:16       ` Eric Blake
2018-04-20  9:46   ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180420092700.GC2533@work-vm \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).