logoalt Hacker News

flohofwoelast Sunday at 4:31 PM0 repliesview on HN

Ah, I wasn't aware of that proposal. But yeah in that case I would also heavily prefer to "drop the dot" :)

IMHO Odin got it exactly right. For a variable with explicit type:

   a_variable : type = val;
...or for inferred type:

   a_variable := val;
...and the same for constants:

   a_const : type : val;
   a_const :: val;
...but I think that doesn't fit into Zig's parser design philosophy (e.g. requiring some sort of keyword upfront so that the parser knows the context it's in right from the start instead of delaying that decision to a later time).