4 ms·
well if you mess up most basic things won't the compiler catch you? i was wondering what sorts of logical errors you were expecting.
by throwawaymaths 1y ago
well if you mess up most basic things won't the compiler catch you? i was wondering what sorts of logical errors you were expecting.
- lenkite 1y agoNo, I don't think the compiler will catch all errors. Wrong type specified in adapter, for example (typical copy-paste mistake). Signature mismatches between anyopaque and MyType, forgetting to assign a function in the v-table, etc
- throwawaymaths 1y agoi think at least forgetting to assign a function is not possible? the compiler will catch that.
- lenkite 1y agoYes, forgetting to assign is caught by the Zig compiler, my bad. (brainfart and confused with C++ there). What the compiler doesn't catch is signature mismatches such as anyopaque to *SomeType or incorrect adapters.