r/ProgrammingLanguages • • Feb 22 '26

Does Syntax Matter?

https://www.gingerbill.org/article/2026/02/21/does-syntax-matter/
63 Upvotes

111 comments sorted by

View all comments

Show parent comment

1

u/gingerbill Feb 23 '26

Odin is a strong statically typed compiled programming language with distinct typing. Very very few things will implicit convert.

Why is the equals needed? Well there are two different ranges there if you notice. 0..<10 and 0..=9. Note both are there to indicate the kinds of ranges that they are. .. and ... are actually ambiguous when reading and going between different languages, as many languages will have the exact opposite meaning to them. This is why we are very explicit with the use of ..< and ..= and it removes any possible reading ambiguity.

expr.cast(T) in practice still requires parentheses around many of the expressions e.g. (expr).cast(T). Odin also already has a similar syntax for type assertions expr.(T) which is used for unions and any.