[ 
http://issues.apache.org/jira/browse/XERCESC-1327?page=comments#action_57851 ]
     
Robert Buck commented on XERCESC-1327:
--------------------------------------

I completely disagree with you. Xerces-C does not have to match the case.

Just because a language agnostic specification uses ALL_CAPS for enumeration 
values does not imply that every language implementation must use ALL_CAPS 
case. This goes for any part of the specification; if something does not 
naturally, nor by conventional wisdom, nor in general practice, map easily into 
the target language, you adapt it. Because Java did not support enum's, did 
that mean that the Apache Group bailed out on writing a Java DOM 
implementation, or that others should not have done so? No, by no means! You 
adapt the specification to the specific situation.

In this specific case I am asking the Apache Group to apply the same 
consideration here, as they have done in other situations where they have 
deviated from a specification in order to provide a language specific 
implementation (e.g. Xerces-Java), that when a the specification has an enum 
value, for instance INVALID, you don't go off and write this as all caps in 
C++. Dang it, how many third-party libraries define INVALID as an expression 
that checks an error code range? Many!

For C & C++, conventional wisdom for two decades now has been to leave ALL_CAPS 
reserved for macros, period. With regards to the enum values in Xerces-C, for 
developers sake (and their sanity), change them to mixed case.





> Change all enum values from ALLCAPS to MixedCase
> ------------------------------------------------
>
>          Key: XERCESC-1327
>          URL: http://issues.apache.org/jira/browse/XERCESC-1327
>      Project: Xerces-C++
>         Type: Bug
>   Components: Build
>     Versions: 2.6.0
>  Environment: All
>     Reporter: Robert Buck

>
> The enum values in Xerces-C are in ALLCAPS, which violates general 
> programming practice, which reserves ALLCAPS identifiers for C preprocessor 
> macros. This is a huge problem for people integrating diverse 3rd-party 
> libraries and Xerces-C, as the enum values often collide with macro 
> expressions. The result is thousands of lines of nearly indecipherable errors 
> being emitted from compilers.
> Please change all enum values to "MixedCase". If you happen to be aware of 
> any other ALLCAPS identifiers in Xerces-C, change those too.
> This is very critical.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to