diff --git a/docs/PROGRAMMING_RULES.md b/docs/PROGRAMMING_RULES.md index 287e219..3eb8561 100644 --- a/docs/PROGRAMMING_RULES.md +++ b/docs/PROGRAMMING_RULES.md @@ -103,3 +103,9 @@ for (int i = 0; i < 100; ++i) { *cursor++ = ...; // Simple increment. } ``` + +## Rule 3: Constants/Read-Only Data + +Access these values directly, like `context->max_buffer_size` or +`context->exception_level`. If we never write to it, the compiler knows it +will not change. It will load once and get cached automatically.