Apart from ambiguity problems, putting the type first can also hamper readability: Types can be very long, so you have to scan a potentially large part of the line before you get to the function name or, worse, can even figure out that the line you are reading declares or defines a function at all. So I don’t think it’s just a matter of personal preference - there are objective arguments against this syntax.
I haven't really encountered such issues, the "way" I read the lines makes it harder for me with Rust and Python's ways, and I find C's way a lot better.
So, if we consider human readability over compiler readability, the arguments are subjective.
So, if we consider human readability over compiler readability, the arguments are subjective.
I disagree, readability can definitely be measured. However, it probably would not hurt to gather actual data, since you are right that people are different.
3
u/[deleted] Sep 17 '22
Python is the 2nd language I use most, but I don't like that syntax either.
I personally prefer the C way:
int main(int argc, char **argv) { }Many times the first thing I want to know is the return type, so like all other ways, it's a personal preference.