forked from AbleOS/ableos
Magic function style guide
This commit is contained in:
parent
0b57c2e9bb
commit
bdb762c986
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue