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 23 '26 edited Feb 23 '26
Note that all built-in procedures are not keyword based but just identifiers. You can still
import "base:builtin"; builtin.lento any of them, since they are just identifiers. And I did not want casting operations which are so common to be in that category, if that makes sense.It's loads of little reasons not just one big one as I said. As for
cast(int), it works like every other unary operator, thuscast(int)myvar * othervaris the same ascast(int)(myvar) * othervar. Note virtually no-one puts a space after thecastdue to habits from C.Again, a lot of this is just how people are. It's not really trying to be "robust" justification rather "this is what people liked in the end".
If it was "just me", I would have not had
cast(type)x, and gone for the consistency, but I am not designing this language for "just me".I've written this comment into an article by the way: https://www.gingerbill.org/article/2026/02/23/designing-odins-casting-syntax/