views:

52

answers:

3

Hello everybody

I strongly try to follow general rules in coding styles. But when i look at .NET, i see that some of classes doesn't match PascalCasing rules. One of them is Hashtable and the other one which i remember is Stopwatch. I think there are more which i don't remember them.

Is there a reason to leave PascalCasing rules for those classes ?

+1  A: 

Because they are both dictionary words.

You probably need a technical dictionary for hashtable, but stopwatch is a legitimate word.
PascalCasing is for cases where you combine different words to the name of your class (* and such), it isn't concerned with the linguistic origin of the word.

Kobi
Stopwatch I'll give you, but I think I'd struggle to find a dictionary that has "hashtable" as a single word. The wikipedia article (yeah, I know) has it as two words, for example.
AakashM
Yeah, well, I gave it a try `:)`
Kobi
A: 

Thats mostly old code and not by purpose. Some would call it a mistake. Imo Stopwatch is correctly cased (stopwatch vs hash table, notice the blank).

Funny note: javas Hashtable is not PascalCase either while the new HashMap is (here im sure it was a mistake as josh bloch says so in effective java afaik)

atamanroman
A: 

It is not a "hash table" but a "hashtable" (as far as I know), so the PascalCasing of that word would then be accurate. Same for "stopwatch". Could be wrong about hashtable though..

peSHIr