3 ms·
For the equivalent thing (interfaces with runtime dispatch and without owning the underlying struct) Zig has explicit vtables. I sort of think any new "interfac
by anonymoushn 4y ago
For the equivalent thing (interfaces with runtime dispatch and without owning the underlying struct) Zig has explicit vtables. I sort of think any new "interfaces" feature should at least partly be about describing constraints on types at compile time.
- remorses 4y agoi think adding interfaces that are simply enforced at compile time would be a good start You could create a new type like Dynamic(InterfaceName) that handles dynamic dispatch somehow