• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Capitalization Crazy C#

 
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was coding today in C# and the first thing my eyes and fingers notice is that C# Really Likes to Capitalize Things by Convention.

I know in German (Deutsch) that all Nouns are capitalized.

Is there some similar thing in Danish that caused Anders to Capitalize More Stuff Than We Ever Would In C++ or Java?

Did this come from Delphi?

Did Bill Gates Request It?

It makes no difference, but since I don't know the reason it always slows me down when I am coding in C#.

Does anyone know this wacky trivia answer?
 
Sheriff
Posts: 28401
100
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Guess is that it was meant to show that C# was Not Java.
 
Saloon Keeper
Posts: 28667
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C# is a Microsoft convention. Microsoft started with MS-DOS, which stored filenames in upper-case only. When Windows and longer filenames came out, so did the ability to mix cases in filenames, but starting with upper-case became a convention even so.

When Microsoft developed their Windows APIs, one of the ways that they distinguished their own functions from those of general Unix functions like the standard C library was to reflect that convention in function names as well.

Along came OLE/COM and a mix of public standard and user-defined interfaces, and carrying on the tradition, their names started with a capital "I".

There may be other contributing factors, but that's how it played out in my view.

Contrasting that, Java capitalizes class names, I suspect, from the fact that OOP had a somewhat mathematical/theoretical origin, and in math, upper-case letters (in whatever alphabet) are often indicators of meta-somethings. Whereas members and properties are lower-case as in C.

Circling around back to C, that viewpoint preceded Java in C++, and since C# is a descendant of C/C++, it gets it from both directions.
 
Jesse Silverman
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mighty innerestin', 'owever, if it turned out that Delphi, which Bill Gates had no influence upon, also Did It, then it would Some'at invalidate the theory, eh?

I found this, not because I ever plan to code in Delphi, I think C/C++/Java/C#/Python/Perl and SQL is more than enough, but I thought it might prove me right or wrong.

From a cursory view, it appears that Tim is right as usual:
http://www.sourceformat.com/coding-standard-delphi-econos.htm#ObjectPascal_Types_Capitalization

I can say at least, Delphi Likes Capitals a Lot Compared To What I Normally Would Expect.
 
reply
    Bookmark Topic Watch Topic
  • New Topic