logoalt Hacker News

infogulch • yesterday at 8:31 PM • 1 reply • view on HN

Doesn't Zig have a pretty nice implementation of compile-time evaluation built in?


Replies

jimmyhmiller • yesterday at 9:09 PM

Comptime in zig is definitely quite cool, but not quite the same.

Consider this example. https://jimmyhmiller.com/split-shot/#/vm

Make the code a comptime argument in zig and you get "store to comptime variable depends on runtime condition".

➕ show 1 reply