Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: