Eric Blake <ebl...@redhat.com> 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.