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

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.len to 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, thus cast(int)myvar * othervar is the same as cast(int)(myvar) * othervar. Note virtually no-one puts a space after the cast due 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/

2

u/Magnus--Dux Feb 23 '26

And I did not want casting operations which are so common to be in that category, if that makes sense.

Yeah, sure, as I said, that's a perfectly valid answer.

Yeah, as I said, is not a big deal, you just read the documentation and problem solved, the point was not how Odin specifically does it but rather to challenge the kind of claims that I explained in my previous reply (I'm not sure what the point of the coding style commentary is, but hey, thanks I guess! haha).

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".

Well, I'm people and I'm not like that haha. Jokes aside, again that's fine, the people that were interested in Odin in the early days liked that and that's ok, I did not take issue with that specific point.

Thanks, I'll read the article later in the evening.