From bdb762c9862b8cc7a4a0fcbe31425f734231fba9 Mon Sep 17 00:00:00 2001 From: Able Date: Sun, 24 Nov 2024 23:50:46 -0600 Subject: [PATCH] Magic function style guide --- STYLE_GUIDE.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 17ed727f..6298d0e6 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -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