Hacker News new | ask | show | jobs
by olodus 2390 days ago
Im not super sure what specific use case you are after but are you sure you can't do this in some ways with comptime generics? I have to be able to do most generic-like stuff with comptime (though I sometimes have to change the implementation a bit). I also really value how clear the lack of overloading makes the language. This way of clearly being able to follow the control flow is one of the things I like that they kept from C.
1 comments

Yes I've tried zig a fair bit and the lack of operator overloading made the use untenable. The "ability to follow control flow" is, IMO, a silly argument. I will concede that `comptime` is a nice feature.