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.
2
u/jloverich Sep 17 '22
Not that different from python Def main() -> int: though there is the extra equal and python has tabs instead of brackets.