2 ms·
There's no reason a feature can't be a problem though. Many would point out that inheritance is both. Interfaces solve most of the problems of inheritance wit
by Turskarama 2y ago
There's no reason a feature can't be a problem though. Many would point out that inheritance is both.
Interfaces solve most of the problems of inheritance with none of the problems. Some people would point out that you can implement interfaces yourself, but that isn't a real solution since either people won't bother or there will end up being a library everyone uses to do it.
I think it's a useful abstraction and leaving it out will slow the adoption of Zig.
- metaltyphoon 2y agoThis and the everything is public in a struct is wild. The “document it” or use _ to mean “don't touch this” for a user is crazy IMO.
- throwawaymaths 2y agoeverything is public in a struct is great, otherwise sane debug printing would be impossible. there are other languages where nothing is private and operability (debugging on the fly when shit is falling down around you in prod) is unparalleled.
- metaltyphoon 2y agoRust has sane debug printing and doesn’t have to allow everything to be public. Opaque types are a thing in C for these reasons. You don’t want users of your code to depend on how it works internally.