Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
C# coding style?
dave_stewart
New
I was just wondering about the C# (I presume?) coding style behind Vanilla.
I generally change my coding style depending on the language I work with (AS3: camelCase, PHP: underscore_case).
I'm generally not too keen on SentenceCase methods and classes in C# as it's not as intuitive to distinguish between properties and classes, but nonetheless, that's what we've got, so I was wondering about the historical background behind the choice?
Cheers,
Dave
I generally change my coding style depending on the language I work with (AS3: camelCase, PHP: underscore_case).
I'm generally not too keen on SentenceCase methods and classes in C# as it's not as intuitive to distinguish between properties and classes, but nonetheless, that's what we've got, so I was wondering about the historical background behind the choice?
Cheers,
Dave
0
Comments
I very like CamelCase coding style name declaration, actionScript/javaScript/php_under_score style is really pissed me off.
I believe that Mark was coming to PHP from C# (or something similar ???.NET maybe)
Many functions names and class names are really same and do same things.
C# (???.NET):
String.IsNullOrEmpty (function)
DataSet class
SqlConnection.ConnectionString
PHP/Garden:
StringIsNullOrEmpty($String);
Gdn_DataSet
GetConnectionString
I like CamelCase style because it used in UnrealScript, and Unreal Tournament (UT2004) is my favorite game (I made a couple of mods/mutators for it).
Personally, I always try to code in the style of the language - it makes it easier for others used to that style to read your code, and remains consistent with native members.
So even though I don't like the visual ambiguity of upper CamelCase Methods and Classes in C# (compared to lowercase camelCase methods and Classes) if I wrote C# I would probably stick to it.
Anyway, the question was in no way a moan - Garden is written so it ain't gonna change - I was just interested