qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/2] qapi: Rename .json to .qapi


From: Dr. David Alan Gilbert
Subject: Re: [Qemu-devel] [PATCH v2 2/2] qapi: Rename .json to .qapi
Date: Fri, 20 Apr 2018 10:27:01 +0100
User-agent: Mutt/1.9.5 (2018-04-13)

* Markus Armbruster (address@hidden) wrote:
> Eric Blake <address@hidden> 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 / address@hidden / Manchester, UK



reply via email to

[Prev in Thread] Current Thread [Next in Thread]