Add Home
commit
131422e700
1 changed files with 22 additions and 0 deletions
22
Home.md
Normal file
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`
|
Loading…
Add table
Reference in a new issue