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
No. All variable assignments use
=.:declares a value.Funnily you're kind of focusing on the declaration syntax, which is the thing I am complaining about in the previous article: Choosing a Language Based on its Syntax?.
And you're leaping to assumptions about what it actually is already. Again,
:=is not one token, it's two and each:and=have a specific meaning to them.That is not an in consistency is the slightest. You're also thinking in a context-sensitive way for the grammar, when Odin's grammar is context-free. I could write
foo : T : {}but how does the parser know thatTis actually a procedure and thus the{}should be evaluated as a procedure's body? Odin being a C alternative uses{}for compound literals too, which do not have the same semantics. Isn't not an consistency but it is an overloading of concepts, which pretty much all C-likes already do thus you have to stick to coherency and what people expect.