Verse Code Style Guide
This guide provides a set of recommended standards for writing consistent code that's easy to maintain. By adhering to these guidelines, developers can improve code readability, reduce errors, and facilitate collaboration. A standardized code style is necessary to ensure code is easy to understand and maintain by both current and future developers working on a project.
This guide provides recommendations, but ultimately the choice is up to your team.
- Common Naming Patterns
Naming is crucial for readable and maintainable code. Try to be consistent in the naming style throughout your code.
1.1 Do
IsX: Often used for naming logic variables to ask a question (for example, IsEmpty).OnX: An overloadable function called by the framework.SubscribeX: Subscribe to framework event named X, often passing an OnX function to it.MakeC: Make an instance of class c without overloading the c constructor.CreateC: Create an instance of class c, beginning its logical lifetime.DestroyC: End the logic lifetime.C:c: If you’re working with a single instance of class c, it’s fine to call it C.
1.2 Don’t
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.