News for hackers. Stuff that matters.
Re:Why is Zig so Cool? by jhgb on Saturday November 08, 2025 @06:53PM (#45861371)
I'm pretty sure the "comptime" keyword only forces you to provide an argument constant at compile time for that particular parameter. It doesn't trigger the compile time evaluation.
Re:Why is Zig so Cool? by WalterBright on Saturday November 08, 2025 @08:46PM (#45862144)
That's how the constant is provided - through compile time evaluation.
Re:Why is Zig so Cool? by jhgb on Sunday November 09, 2025 @04:09AM (#45864144)
Yes, but compile-time evaluation in Zig doesn't require the "comptime" keyword. Only specific cases such as compile-time type computation do (but these specific cases are not provided by compile-time function evaluation in D anyway, so language choice wouldn't make a difference here).