-2

Given that one needs to deal with case sensitive environment, when would one benefit from having all caps or all non-caps names of variables or similar identifiers, as opposed to have camel case? Limit being number of characters being enforced - max 6!

Normally one would not care about the case (machines would sort it by copy/paste mechanism), but every now and then, humans would need to deal with them directly.

I would rather see either all upper or lower case, for the fact of not need to remember the case in the first place.. and yes there might be a policy in place to manage this, but then again, is it worth to have that kind of policy at all!?

EDIT:

Thanks for the comments, but maybe I should clarify what I'm after exactly. I agree that naming convention should be adhered to, and I'm not trying to find excuses not to respect it. It is more like trying to change the policy and have some reasonable arguments for doing so.

This is not about programming language and I apologize if this is not the right place to discuss this - it seemed the right place to ask since I know software engineers deal with 'cases' on daily basis.

1 Answers1

12

The point of camelCase or PascalCase is to help humans parse a string of letters into separate words. This can turn out to be important as experts-exchange.com found out the hard way. ExpertsExchange.com brings to mind a very different site than ExpertSexChange.com.

If you were talking about setting a coding standard I'd point you to other successful standards in your language, but a 6 character limit makes me wonder if those even exist.

The real question then is, do you have multiple words for humans to parse in these 6 characters? I've dealt with systems that had a similar scheme, though ours was 8 characters. We did ours in all caps. Conceptually it was 2 four character "words" mashed together. Human parsing wasn't an issue because it was always 4 and 4. Here the "policy" made this a non issue.

You'll need to look into what values will be represented with these 6 characters before anyone will be able to say if sticking with all caps or otherwise is the best but my impression is that it's hard to cram two words into 6 characters.

candied_orange
  • 119,268