Replies: 2 comments 1 reply
-
I think we meant "private fields" when we said "member variables" anyway. It might make sense to include game related stuff. I.e. assets should be named in PascalCase, actions should be SCREAMING_SNAKE_CASE |
Beta Was this translation helpful? Give feedback.
-
Updating this because of a good observation from @PhoebeMitchell in this PR: These are the settings JetBrains' tools come up with when you point them at the current state of the codebase: Notice how /// rather than
private static readonly List<string> _coolPreInitializedCollection = new List<string>() { ... }; // 1
/// we would have
private static readonly List<string> CoolPreInitializedCollection = new List<string>() { ... }; // 2 My initial suggestions was having Personally I can see both reasons, and if it weren't for the fact that I think I'm leaning towards |
Beta Was this translation helpful? Give feedback.
-
I'd suggest limiting the
_
-prefix toprivate
fields, not all member variables.Also, instead of this rule, I think we should just cover all possible instances of names instead. For example JetBrains' defaults set:
camelCase
PascalCase
private
fields to_prefixedCamelCase
const
values toUPPER_CASE_SNAKE_CASE
PascalCase
I personally find those to be pretty intuitive.
EDIT: Addition for anything Unity/Ink specific:
.ink
files should useSCREAMING_SNAKE_CASE
ActionDecoder
class, only these also useSCREAMING_SNAKE_CASE
PascalCase
Beta Was this translation helpful? Give feedback.
All reactions