title: What is the recommended naming convention for Thrift identifiers in order to maximise cross-language compatibility?
body: <p>Is there a recommended naming convention for identifiers in Thrift?</p>
  
  <p>For example, we had a Thrift IDL written by somebody who's usually a C# programmer. Source code generated from this worked in both C# and Python. However, although Java code could be generated from the same Thrift file there were Java compiler errors everywhere the author of the IDL had given identifiers names that were exactly the same as their types. For example:</p>
  
  <pre><code>enum DataType {
      Text,
      Integer
  }
  
  struct Metadata {
      1: string ColumnName,
      2: DataType DataType
  }
  </code></pre>
  
  <p>Note the 'DataType' identifier has the same name as its type, case included. The generated Java code (using the <code>--gen java</code> Thrift compiler option) had compiler errors like this:</p>
  
  <pre><code>Cannot make a static reference to the non-static field DataType
  </code></pre>
  
  <p>I'm not a C# programmer myself but I understand starting identifier names with capital letters is quite common practice in C#. As it stands we're going to have to change the IDL to use lowercase for the identifier names (e.g., <code>DataType dataType</code>) and regenerate all our clients; but it would have helped if there had been some advice on naming conventions for Thrift identifiers so we wouldn't have run into problems like this for other languages.</p>
  
  <p>BTW I did try <code>--gen java:nocamel</code> but that didn't solve the problem.</p>