I think that for keywords, that language's implementation should
generate something sensible if there's code generation installed.  So,
the Java specific compiler could have a list of Java keywords
embedded.  If it sees "long", it just replaces it with "long_" in the
generated code.  The only reserved words in Avro are the names of
built-in avro types...

Would that be sensible?

-- Philip

On Mon, Nov 16, 2009 at 12:13 PM, Patrick Hunt <ph...@apache.org> wrote:
> Same problem for enums btw. If you use symbols:["long", "null"] etc... the
> java will fail to compile (fine for python though on both these issues).
>
> Patrick
>
> Doug Cutting wrote:
>>
>> Patrick Hunt wrote:
>>>
>>> Re 153 - last night I noticed that if you spec a record/enum/etc... with
>>> a name that starts with lower case it fails to compile in Java:
>>>
>>> * start with [A-Za-z_]
>>>
>>> Add this to 153 or a new JIRA?
>>
>> Do we want to enforce naming conventions or just leave them conventions?
>>  If they're just conventions, this is a bug in java, if they're to be
>> enforced, this could be part of 153's updates to the spec.
>>
>> Also, the Java compiler currently fails when names are Java reserved
>> words.  I guess we could prefix every name somehow to prevent this, but
>> that's soooo ugly.  Should we perhaps prefix just reserved words?  This is
>> certainly a separate issue.
>>
>> Doug
>

Reply via email to