logoalt Hacker News

zoogenylast Sunday at 5:51 PM0 repliesview on HN

There was a recent Zig podcast where Andrew Kelley explicitly states that manually defining a VTable is their solution to runtime polymorphism [1]. In general this means wrapping your data in a struct, which is reasonable for almost anything other than base value types.

1. https://youtu.be/x3hOiOcbgeA?si=Kb7SrhdammEiVvDN&t=7620