Hacker News new | ask | show | jobs
by Comevius 1490 days ago
In Zig print formatting is comptime (it is evaluated at compile-time). I find this so neat. You can also achieve comptime monomorphization (generics) and polymorphism (interfaces) this way. No macros or templates needed.

https://github.com/xbinner18P/leachim6S/blob/main/z/Zig.zig