Magic function style guide

This commit is contained in:
Able 2024-11-24 23:50:46 -06:00
parent 0b57c2e9bb
commit bdb762c986

View file

@ -21,6 +21,17 @@ a := fn(): void {}
/// in fat32.hb
a := fn(): void {}
```
## Magic Functions | loose
'Magic functions' are what I am calling small helper functions that do one or two things.
### Example
```rust
a := null
magic_a := fn(){
a = 10
}
```
The exact policy I want to have here is a bit fuzzy. I think that functions like this are nice in certain situations and not in others.
Regardless of if you use them or not, put a comment above the function explaining rational.
## Magic Numbers | loose