Re:Hobby x86 kernel written with Zig
by apta on Monday January 06, 2020 @09:49AM
(#21969481)
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.
[ Parent
| on HN ]
Re:Hobby x86 kernel written with Zig
by jackhalford on Monday January 06, 2020 @10:25AM
(#21969768)
this 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.