3 ms·
I find Zig's approach to generics to be very cool. Types are a first class citizen, so you basically get generics out of the box. Combined with Zig's `comptime`
by apta 7y ago
I find Zig's approach to generics to be very cool. Types are a first class citizen, so you basically get generics out of the box. Combined with Zig's `comptime` makes for writing very cool code. This solves lot of things you'd need macros in other languages to do.
- jackhalford 7y agothis exactly, the language doesn't know about generics but having first class types + comptime allows you to do generics. Writing C feels like a chore now.