|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] Re: [RFC 0/7] QError v1 |
Date: | Fri, 30 Oct 2009 14:04:28 -0500 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090825) |
Jamie Lokier wrote:
Anthony Liguori wrote:Jamie Lokier wrote:Javascript has keywords (like true, false, and null) that could lead to confusion using such a syntax.Anthony Liguori wrote:Okay, let's get more clever then and do: #define QERR_DEV_NFOUND "{ 'code': 404, 'name': %s}"By the way, since you've already invented a non-standard JSON extension, which is the single quotes, why not go a step further and permit the quotes to be omitted for simple tokens? #define QERR_DEV_NFOUND "{ code: 404, name: %s}" Much neater, IMHO.I was thinking only before the colon in a dictionary. Are the keywords a problem in those positions, for Qemu?
Eh, that's adding all sorts of nasty context-sensitivity and would abuse the lexer keyword tokens.
I really don't think it's justified. I also think it's ugly :-) Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |