Once again language designers forget hat programmers spend more time reading than writing. Making code as easily readable as possible should be a top priority. Instead it seems this experiment is making life of compiler writers as easy as possible. I just do not see how it can be a success. Heck if i wanted fancy weird syntax full of magical symbols i would use rust at this point, even though i think its a wasted opportunity that does not deliver anything substantial (outside of few specific areas) to mitigate loss of c++ ecosystem and to warrant switching from c++.
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.
23
u/ToughQuestions9465 Sep 17 '22
Once again language designers forget hat programmers spend more time reading than writing. Making code as easily readable as possible should be a top priority. Instead it seems this experiment is making life of compiler writers as easy as possible. I just do not see how it can be a success. Heck if i wanted fancy weird syntax full of magical symbols i would use rust at this point, even though i think its a wasted opportunity that does not deliver anything substantial (outside of few specific areas) to mitigate loss of c++ ecosystem and to warrant switching from c++.