|
|
|
|
|
by uecker
378 days ago
|
|
My point is not about whether compile-time programming is simpler in C or in Zig, but that is in most cases the wrong solution. My example is also not about compile time programming (and does not use macro: https://godbolt.org/z/Mc6M9dK4M), but about letting the optimizer do its job. The end result is then leaner than attempting to write a complicated compile time solution - I would argue. |
|
But if there were zig would prob be simpler since it uses one language that seamlessly weaves comptime and runtime together