Hacker News new | past | comments | ask | show | jobs | submit login

Ah okay, so this is like C++ templates then. This always feels a bit like halfway to duck typing to me; it'll still get caught at compile time, but I'll get errors at every single call site where I pass something wrong rather than just one in the definition, like you mentioned. I have the same gripes with Go's interfaces, although I think I'd prefer Zig's way of doing it because the experience would essentially be the same, just with less boilerplate.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: