TL;DR
Implement Zig interfaces using vtables — use tagged unions for closed dispatch and function pointer structs for open, runtime polymorphism.
Key concepts
- zig interfaces
- zig vtable
- zig polymorphism
- zig dynamic dispatch
- zig function pointers
TL;DR
Implement Zig interfaces using vtables — use tagged unions for closed dispatch and function pointer structs for open, runtime polymorphism.
Key concepts