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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v2 2/2] qapi: Rename .json to .qapi
Date: Fri, 20 Apr 2018 10:35:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

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.

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.

[...]



reply via email to

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