Better HN
topnewbestaskshowjobs
Log inSign up

varyous

4 karma · joined Jul 19, 2025 (1y ago) · 1 submissions

Submissions

comment 1y ago · link · parent

The zig std library often builds vtables for structs in an effort to minimize runtime cost for the typical non-virtual cases. I feel it leads to creating a lot of boilerplate to effectively have virtual functions. Worse, you have to study the zig code in a case by case basis to determine how to even use this ad-hoc virtual function scheme. Surely zig can introduce virtual function support in a more ergonomic way than this, as it's so widely used in real life code and extensively in zig's own std library.