avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Custenborder <jcustenbor...@gmail.com>
Subject Re: C# and the keyword namespace
Date Mon, 07 Jun 2010 17:55:18 GMT
Yes I can do that and this answers my question. I agree with you that I
maintaining a keyword list is a bad idea.  I was not sure what the other
implementations do or have planned. Thanks!

On Mon, Jun 7, 2010 at 12:50 PM, Doug Cutting <cutting@apache.org> wrote:

> 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",
>>
>>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message