3 ms·
Agreed that native interface support is table stakes for any language now. It would avoid so much boilerplate - nevermind the time wasted examining the code to
by leagreeer 1y ago
Agreed that native interface support is table stakes for any language now. It would avoid so much boilerplate - nevermind the time wasted examining the code to see what kind of ad-hoc interface any given piece of code is using - and how to retrieve the ridiculous zig vtable data member for each pseudo class instance. It just amounts to useless noise in the code, rather than succinctly stating the intent.
- throwawaymaths 1y ago> nevermind the time wasted examining the code to see what kind of ad-hoc interface any given piece of code is using this is not really a problem I've encountered. did you have a specific case where you got puzzled?
- leagreeer 1y agoIn every different zig project you have to read the source code to see how their specific ad-hoc interface scheme works. Case in point - this article uses a method `pub fn implBy(impl_obj: anytype)` to connect instances to a vtable. The new zig writer uses a `.interface` data member scheme: https://www.openmymind.net/Zigs-New-Writer/ https://www.openmymind.net/Zigs-New-Writer/ in addition to understanding when and when not to use it.