Friday, July 23. 2010Of Camels and People: Converting back and forth from Camel Case, Pascal Case to underscore lower casePrinter FriendlyRecommended Books: Mastering Regular Expressions PostgreSQL Developer's Handbook Elements of Programming
Comments
Display comments as
(Linear | Threaded)
And then you get into plural or singular table naming... =) I used to be singular (person.first_name) but have gotten used to plural (people.first_name) after working on Rails code for a while (plural is the default, though you can override that).
I would not characterize camelCase as being prevalent in C (any more than any other style). The GNU coding standard (http://www.gnu.org/prep/standards/html_node/Names.html#Names) specifically rejects camelCase. If you've seen much camelCase in C code it's probably Windows- (Hungarian notation) influenced. Also, what you call Pascal case, Guido van Rossum (http://www.python.org/dev/peps/pep-0008/) calls CapWords. In Python, CapWords are almost exclusively reserved for class names, function and variable names use the lower_case_with_underscores. Lastly, the UPPER case style used in Oracle is influenced by System R and IBM mainframes, and probably teletypes (hard to shift between cases).
Joe,
Yes you are right. I think I was thinking about C++ when I said that. corrected. I've seen a lot of C++ code with camel style, but few pure C source code with camel style.
Thanks for the techniques.
What you call “Pascal case” is more properly called “title case”. The latter name is not language-specific, is not even programming-specific, and describes the style more directly. |
Entry's LinksQuicksearchCalendar
Categories
Blog Administration |
Tracked: Sep 04, 00:21