[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.
- [Qemu-devel] [PATCH v4 00/19] drop qapi nested structs, Eric Blake, 2014/09/19
- [Qemu-devel] [PATCH v4 04/19] qapi: Document type-safety considerations, Eric Blake, 2014/09/19
- [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Eric Blake, 2014/09/19
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Markus Armbruster, 2014/09/23
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Eric Blake, 2014/09/23
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Markus Armbruster, 2014/09/24
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Kevin Wolf, 2014/09/24
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Markus Armbruster, 2014/09/24
- Re: [Qemu-devel] [PATCH v4 08/19] qapi: Better error messages for bad expressions, Markus Armbruster, 2014/09/26