# Dynamic Dispatch

Record: `arch:dynamic-dispatch`
Kind: mechanism
Layer: [Extensibility Core](https://banes-lab.com/records/layer/extensibility-core.md)
Severity: recommended
Scope: method, interface, runtime
Canonical: https://banes-lab.com/ontology#arch-dynamic-dispatch

## Repair

- Refactored by: Introduce Polymorphic Method, Strategy
- Detected by: switch/if chains on type
- Violated by: manual dispatch over concrete type
- Measured by: conditional dispatch count
- Enforced by: lint rules, [review](https://banes-lab.com/records/lex/review.md)

## requires

- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)

## reinforces

- [Open/Closed Principle (OCP)](https://banes-lab.com/records/arch/open-closed.md)

## enables

- [Replace Conditional with Polymorphism](https://banes-lab.com/records/lex/replace-conditional-with-polymorphism.md)

## conflicts-with

- [Type-Switch Dispatch](https://banes-lab.com/records/lex/type-switch-dispatch.md)

## tensions-with

- [Traceability](https://banes-lab.com/records/arch/traceability.md)

## tensions

- [Dynamic Dispatch Traceability](https://banes-lab.com/records/tension/dynamic-dispatch-traceability.md)

## referenced-by

- [Polymorphism](https://banes-lab.com/records/arch/polymorphism.md)
