diff --git a/context/design-principles.md b/context/design-principles.md index 701ace0..bd3e5df 100644 --- a/context/design-principles.md +++ b/context/design-principles.md @@ -32,6 +32,12 @@ Commands compose via `Binding::Sequence` — a keymap entry can chain multiple commands, each contributing effects independently. The `o` key (add row + begin editing) is two commands composed at the binding level, not a monolithic handler. +### Decompose rather than early return + +Early Returns usually are a signal of mixed responsibilities: if an early return +would clarify a function, consider how the function could be decomposed for the +same effect without the early return. + --- ## 2. Polymorphism Over Conditionals