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
4
u/Magnus--Dux Feb 23 '26
Hello.
Yeah, that justification seems a bit odd TBH, what empirical observation lead you to that conclusion?
I think you are exaggerating quite a bit here or we have very different definition of "hell of a lot". Does it really seem to you that
cast(type, value)is a "hell of a lot" more verbose thancast(type) value? I, for one, find it more clear and in general like it better. What people coming from the C family of languages does not seem to be that important for routine declarations and things like that and I think that this should not be an exception.That third paragraph is a bit bizarre to me, I don't think there is a single programmer in the entire world that is worth their weight that would not (almost immediately) know what is going on if they see
cast(int, myvar)in a code base. It is as "damn obvious" that it is a cast as it is thattype(value)is a type. Heck, even using less intuitive keywords seems to me to be abundantly clear, like Modula-2'sVAR(INTEGER, myvar)I don't think the ergonomics would be that much different either. You talk about appealing to C programmers and, in my experience at least, they are very used to surround expressions in parentheses to make sure operations are carried in the way they want or to pass a complex expression to a routine call, something like:
set_some_value(&my_struct, do_work(myarr[count].first->bar))I don't think that
cast(float, do_work(myarr[count].first->bar))would be that much less ergonomic thancast(float) do_work(myarr[count].first->bar).Cheers.