CamelCase naming convention
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
I would refer the honourable gentleman to the following[^]. Of course, each to his own, but the document above is possibly the reason as far as C# is concerned.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
I really don't like having underscores in method or variable names :~. Just a matter of choice. And I find the CamelCase notation not really difficult to read or write.
Cédric Moonen Software developer
Charting control [v2.0 - Updated] OpenGL game tutorial in C++ -
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
IHaveNeverReallyHadThisProblemBecauseIFindItEasyToBothReadAndWrite(); PerhapsItIsAMatterOfCodingStyleAndPersonalPreference(); UnderscoresTakeTooLongToWrite(); AllLowercaseMakesTheMethodNameDifficultToRead(); WithCamelCaseICanDifferentiateBetweenWordsVeryEasily(); OfCourseItDoesNotHaveAnyRealValueInNormalWriting();
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
Nemanja Trifunovic wrote:
Lispers have the best of both worlds (well, except for the parentheses): (get-my-precious-data-from-an-XML-file)
Surely Lispers should have ...
(get-my-prethiouth-data-from-an-EkthML-file)
?------------------------------------ "I am always serious about what I do, not necessarily about how I do it." Tom Baker
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
That is actually Pascal Case. thisIsCamelCase. :)
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
Slow day? Feel the need for a completely arbitrary flamewar? I'll bite :)
Nemanja Trifunovic wrote:
With undrescores it is at least easy to read if not to write: get_my_precious_data_from_an_XML_file()
That makes my stomach churn. For no other reason that typing the underscore is a PITA. I find camel casing more aesthetically pleasing, at least to my eyes.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog Just Say No to Web 2 Point Oh
-
Slow day? Feel the need for a completely arbitrary flamewar? I'll bite :)
Nemanja Trifunovic wrote:
With undrescores it is at least easy to read if not to write: get_my_precious_data_from_an_XML_file()
That makes my stomach churn. For no other reason that typing the underscore is a PITA. I find camel casing more aesthetically pleasing, at least to my eyes.
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog Just Say No to Web 2 Point Oh
Not flaming, agreeing. IPreferWritingThingsThisWayAsTheyArePerfectlyReadableAndNegateTheHorribleUnderscore()
------------------------------------ "I am always serious about what I do, not necessarily about how I do it." Tom Baker
-
That is actually Pascal Case. thisIsCamelCase. :)
Brady Kelly wrote:
That is actually Pascal Case. thisIsCamelCase.
Depends whom you ask[^]. I consider Pascal case to be a variant of camel case.
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
That's Pascal casing. Anyway, neither is inherently better, just different. If you have a choice, use what you like; if not then use what you're told to use and in ten or twenty years you'll find that you prefer it over the other.
-
IHaveNeverReallyHadThisProblemBecauseIFindItEasyToBothReadAndWrite(); PerhapsItIsAMatterOfCodingStyleAndPersonalPreference(); UnderscoresTakeTooLongToWrite(); AllLowercaseMakesTheMethodNameDifficultToRead(); WithCamelCaseICanDifferentiateBetweenWordsVeryEasily(); OfCourseItDoesNotHaveAnyRealValueInNormalWriting();
Computafreak wrote:
IHaveNeverReallyHadThisProblemBecauseIFindItEasyToBothReadAndWrit
You find that easy to read? :~ As for ease of writing, how many time did you have to press Shift?
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)
I prefer:
[myPreciousData loadFromXmlFile];
-
Computafreak wrote:
IHaveNeverReallyHadThisProblemBecauseIFindItEasyToBothReadAndWrit
You find that easy to read? :~ As for ease of writing, how many time did you have to press Shift?
Nemanja Trifunovic wrote:
how many time did you have to press Shift?
As you have to press Shift to get an underscore, I'd say about the same.
-
Brady Kelly wrote:
That is actually Pascal Case. thisIsCamelCase.
Depends whom you ask[^]. I consider Pascal case to be a variant of camel case.
You're tea is ready, sir. One hump or two?
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
-
That's Pascal casing. Anyway, neither is inherently better, just different. If you have a choice, use what you like; if not then use what you're told to use and in ten or twenty years you'll find that you prefer it over the other.
PIEBALDconsult wrote:
That's Pascal casing.
-
Nemanja Trifunovic wrote:
how many time did you have to press Shift?
As you have to press Shift to get an underscore, I'd say about the same.
Steve_Harris wrote:
As you have to press Shift to get an underscore, I'd say about the same.
Exactly - which is why I said that underscores are easy to read but hard to write.
-
You're tea is ready, sir. One hump or two?
Christopher Duncan Author of The Career Programmer and Unite the Tribes www.PracticalUSA.com
-
I prefer:
[myPreciousData loadFromXmlFile];
I can almost see you sitting in front of your computer, Rama, hunched over ... coveting your code ... whispering ... It is ... My Precious ... :rolleyes:
-
Why most programmers (at least Windows and Java programmers) use this horrible notation? It is both hard to write and hard to read:
GetMyPreciousDataFromAnXMLFile()
With undrescores it is at least easy to read if not to write:
get_my_precious_data_from_an_XML_file()
And of course, there is always a way to make it easy to write but hard to read:
getmypreciousdatafromanXMLfile()
Lispers have the best of both worlds (well, except for the parentheses):
(get-my-precious-data-from-an-XML-file)
I feel better now - feel free to vote me down :)