Get the latest tech news
Things Zig comptime won't do
Es el disco de Odín. Tiene un solo lado. En la tierra no hay otra cosa que tenga un solo lado.
That’s fascinating, but, to be fair, there’s a bunch of languages with quite powerful compile time evaluation capabilities that can do equivalent things. The carrot you’ll get in exchange is a guarantee that, for each specific call with a particular value of x, the compiler will partially evaluate f, so only one branch will be left. Our code will be smaller, and will compile faster if there’s just a single print that takes an opaque pointer and runtime parameter describing the type of the value (its fields and offsets).
Or read this on Hacker News