qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplic


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v4 10/19] qapi: Better error messages for duplicated expressions
Date: Wed, 24 Sep 2014 17:29:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 09/24/2014 05:58 AM, Markus Armbruster wrote:
>
>> 
>> We have separate name spaces for events, commands and types.  Works for
>> me.  A single name space would work for me, too.
>
> I thought about that too.  Our conventions are that commands are
> all-lower-case, events are ALL_UPPER, and user-defined types are
> CamelCase - so a single namespace would not have any collisions, except
> for one case: built-in types like 'int' are also all lower, which
> collides with commands.  But I see no technical reason why we wouldn't
> be able to generate C code for a command named 'int'.  I can go either
> way, but should probably add a test for a .json file that does
> {'command':'int'} to test which way we go.  Preferences on whether that
> should be allowed or forbidden?

With a single name space, 'command': 'int' should collide with the
built-in type.

With separate name spaces, it should in theory just work.  No big deal
if it doesn't due to generator sloppiness or something.

As I said, I'm fine both with keeping the current separate name space,
and with switching to a single name space.  Either way, documentation
would be nice.



reply via email to

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