Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
v0id_isgood
· 3mo ago · 0 comments
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.
Comments
[–]
bramadityaw
3mo ago
isn'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.