Add Home

Booklordofthedings 2025-03-07 10:05:26 +01:00
commit 131422e700

22
Home.md Normal file

@ -0,0 +1,22 @@
### Beef Styleguide
This is a very basic styleguide for naming things and how to code in Beef.
Its formatted as a list of rules to make it somewhat easier to read and understand.
<hr>
**No rule is absolute and there may be legitimate reasons to break them.**
<hr>
#### Naming
- Names are either `camelCase` or `PascalCase`
- Classes should be named in ``PascalCase`
- Structs and enums can be `camelCase` but dont have to be
*This specifically depends on their usage. If it is supposed to be treated similar to a primitive it should be camelCase, otherwise its PascalCase.
(This also means that a class that behaves like a primitive could be named in camelCase, but thats unlikely to happen in practice)*
- Interfaces use the I[Name] syntax
*Optionally with the "-able" postfix*
- Iterators for numerical reasons should use `i`, `j`, `k`, `ii`
*Two of the same character is fine since its visibly different, but further repetition should be avoided*
- Iterators in foreach type scenarios should use the singular version of the thing they are ( `line`, `entry`, `key`)
- Other common names: `toReturn/res/result`