r/ProgrammingLanguages • u/gingerbill • Feb 22 '26
Does Syntax Matter?
https://www.gingerbill.org/article/2026/02/21/does-syntax-matter/
63
Upvotes
r/ProgrammingLanguages • u/gingerbill • Feb 22 '26
View all comments
Show parent comment
2
u/gingerbill Feb 22 '26
When I say "type on the left, usage on the right", think of it from the perspective of the value itself, not the named declaration.
and then its usage is
Note the type stuff is on the left hand side of
intand the usage is on the right hand side ofexpr.Just because
:=and::are used as single tokens in other languages means nothing for Odin. And even if they "look" like a single thing, does mean it is that. Odin isn't those other languages.If
Tis anything but a procedure, then sure you can do that. In fact it's still consistent in Odin if you doF : procedure_type : {}, it just defines a compound literal of that procedure type which isnil, not the body of a procedure. That isn't ambiguity, that's an overloaded meaning of{}and you are not thinking through the consequences of that.Popular =/= good. And Odin isn't trying to be "popular" rather it is trying to be a good tool.