Tyrsis / SE-Community-Mod-API

Space Engineers Community Modding API
GNU Lesser General Public License v3.0
23 stars 11 forks source link

Coding Standard reference #47

Open Moustachauve opened 9 years ago

Moustachauve commented 9 years ago

The update changed all standard setted for the project, is there any reason for the change?

https://github.com/SEModCommunity/SE-Community-Mod-API/wiki/Coding-Standard-reference

dodexahedron commented 9 years ago

A few things to answer your question:

  1. I hadn't seen this document, so I was unaware of its existence in the first place.
  2. These "standards" are very non-standard for c# development. Please see https://msdn.microsoft.com/en-us/library/ms229002%28v=vs.110%29.aspx for a jumping-off point for what tend to be the most common practices (and therefore what the majority of people are already comfortable with) in c#.
  3. Almost all changes made have been to private members, so they shouldn't affect plugins. The one notable exception being the CommandLineArgs class, which had its case changed.
  4. The project already didn't follow that standard to the letter, anyway. Many public members weren't/aren't commented, or they have very terse, basic comments just to fit the "standard" which is just as useless as not having them in the first place.
  5. Regions don't help anything, and can make it harder to find something if you don't know what type it is, going into it. If you have a symbol, foo, and you have no idea whether it's a member, property, delegate, event, method, etc, how are you supposed to know which region to look in? You don't. You're going to do what everyone else does and either use built-in language-aware features of visual studio and go right to the symbol or you're going to hit ctrl+f and find the symbol that way.
  6. The original maintainers of the project abandoned it, so their opinions on style are immaterial to what the current maintainers (ie Tyrsis, myself, or anyone else who has forked it) prefer to use.
  7. I strongly disagree with the majority of the conventions outlined in that (see item 2 above).
  8. This is an alpha, and is therefore subject to rapid and sometimes breaking changes, in order to make it as clean, maintainable, and future-proof as possible.