Jeremy,

Rather than trying to have Avro contain a universal set of reserved words, each implementation should somehow cope with its own reserved words. The java version of Avro mangles Java's reserved words with a final dollar-sign. See for example TestSpecificCompiler#testManglingForProtocols, where Philip creates a protocol that includes every Java reserved word and then checks that the Java compiler can handle the generated code. Is something like this possible for this case in C#?

Doug

On 06/07/2010 10:38 AM, Jeremy Custenborder wrote:
All,

Some of you might already know that I have been working on the .net port of
Avro.  I'm looking at the protocol example namespace.avpr and for c# there
is a slight problem. The avro namespace for this protocol contains the
keyword "namespace" which is a reserved keyword in C#. This prevents me from
generating C# bindings for this protocol. Is there something in the current
specification for reserved keywords? Is there a plan to?  I could see this
being an issue with other languages in the future.

Error 1 Identifier expected; 'namespace' is a keyword

J

{"namespace": "org.apache.avro.test.namespace",<-Keyword of death :)
  "protocol": "TestNamespace",

Reply via email to