- Use `std::variant<A, B, C>` with `std::visit` for type-safe sum types — replace runtime polymorphism with compile-time dispatch where possible.
- Use C++20 `concept` constraints to enforce template requirements at the call site — replace SFINAE and `static_assert` with readable concept names.
- Prefer value semantics (pass by value, return by value) and rely on move semantics for efficiency — avoid unnecessary heap allocation and indirection.
- Use `std::optional<T>` to represent nullable values explicitly — never use sentinel values (`-1`, `nullptr`, empty string) to signal absence.
- Use `if constexpr` for compile-time branching instead of tag dispatch or template specialization — it keeps code linear and readable.
- Use structured bindings (`auto [key, value] = pair`) to decompose pairs, tuples, and aggregates — they eliminate index-based access and naming boilerplate.
- Prefer `std::function` for type-erased callables in APIs and lambdas with `auto` parameters for compile-time polymorphic code.