My preference would be:
{ 'type': 'MyType', 'fields': { 'a': 'str', 'b': 'int', 'c':
'AnotherType' } }
{ 'event': 'MY_EVENT', 'arguments': {...} }
{ 'command': 'my-command', 'arguments': {...}, 'returns': 'int' }
I do prefer the dictionary syntax for arguments over a list because a
list implies order. Plus I think the syntax is just awkward and a
whole lot easier to get wrong (too many/few elements in list).
Yeah. We can rationalize it by saying that most dynamic consumers of
the schema will not care about argument order, and that if they do,
they can implement a custom parser.
I don't think I want to make this sort of change just yet. Also note
that the schema that will be exposed over the wire is not directly
related to the schema we use for code generation.
Right, we have to nail down the format for the former, though.