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
1
u/yuehuang Feb 23 '26 edited Feb 23 '26
My 2c. I used a language that allows new variables without declaration. For example,
x: int = 1vslet x: int = 1The issue is when variables are typed wrong; rather than an assignment, a new variable is created.Why is equal needed in this
for i in 0..=9? I would assume it is assigned toi.I agree that
->and.could merge in most cases.Instead of C style cast, could you use extension function to cast.
expr.cast(T). Or C#iskeyboard cast that could be paired handling of Variant/Union.GL with Odin.