[ 
http://issues.apache.org/jira/browse/XERCESC-1327?page=comments#action_57852 ]
     
Jesse Pelton commented on XERCESC-1327:
---------------------------------------

Case matters, for (at least) three reasons.  First, it's easier for a user to 
determine that the identifier used by the implementation is intended to match 
the one in the spec if the case is the same.  Second, it's a slippery slope.  
Why not use camel case and get rid of those wasteful underscores, so 
INVALID_STATE_ERRS becomes InvalidStateErrs?  But most important, the code 
becomes tied to a specific implementation.  If all implementations follow the 
specification closely, users can much more simply move to a different one if 
there is reason to.

I agree that INVALID is a horrible identifier.  Maybe it should be changed.  If 
it isn't part of a spec (I couldn't find it in one), I'd be all for changing it.

I think we're better off addressing specific cases like this than making 
blanket changes.  Bear in mind that part of the responsibility for the problem 
lies with developers who 1) continue to use manifest constants when better 
constructs have long been available and 2) choose broad names like INVALID for 
such constants.  I would expect such problems to decrease over time as 
developers use more modern language features.

> 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