Which case convention is the best?
🎵 Vintage Reggae Cafe Best of
Very shortly... Do you have a case convention? Do you find it the best of the possible ones, if
Personally I don't quite have a case convetion that I find to the best one. I mean, a year ago
I would think that the C# conversions - Something like that:
1 - PascalCase for class names -
2 - PascalCase for method names -
3 - camelCase for variables -
var myAwesomeVariable = 10;
4 - PascalCase for constants -
const int ThisValueIsAConstant = 20;
I mean, I like the Apple's Obj-C way of define constants as well:
and some Java code that define enums / constants with:
but at the end all of them seems to me personal preferences - which is fine -
but don't let me know if there's a way to write code that is scientifically better than the other.
So in a quest to find a best code style possible I tried to search some papers that describe some
researches on that matter. Well I did find a lot of stack overflow posts - which I won't consider since
them are based on personal opinions, some blog posts - idem, and finally two papers describing some research
An Eye Tracking Study on camelCase and under_score Identifier Styles
On Planning an Evaluation of the Impact of Identifier Names on the Readability and Maintainability of Programs
I didn't read them yet - you know today is sunday, so time to clean the house, make some meal, organize stuff to
the next week and so on... But I'm quite hopeful that this papers will help me to find a answer to the question
or at least help me to point in the right direction.
Let's see what they reserve and I'll write about my findings soon ;D