2 ms·
const can be used in places that need a compile-time-known value (like a fixed array size). let can't, even if it obviously holds a fixed number.
by v0id_isgood 2mo ago
const can be used in places that need a compile-time-known value (like a fixed array size). let can't, even if it obviously holds a fixed number.
- bramadityaw 2mo agoisn't there a way to infer that from context? like if the variable is declared with the Comptime role. Some guy said that the const keyword was a mistake C made that is then blindly followed by its successors.