Syntax flubs
Posted Jan 27, 2010 20:53 UTC (Wed) by
ncm (subscriber, #165)
Parent article:
GCC to merge Go support
I guess this means it's too late to fix the pointer-dereference syntax. Go is (well, was) unique in that they can (could) change the language syntax any time they liked. They have a tool that can update all the code in their repository with the new syntax, and there's essentially no Go code not in the repository.
It makes some sense to copy C syntax when you have to read C header files. It is powerfully stupid to copy C syntax mistakes if you don't need to read C header files. (Yes, Java too.) One of the biggest C syntax mistakes was the prefix dereference operator. Pascal, of all languages, actually got dereference syntax right -- postfix dereference may be the only thing Pascal got right.
Of course there were numerous other C language syntax design mistakes. Perhaps the worst was the low precedence of bitwise operators, itself inherited from B (used to be there were no short-circuiting && or || operators, so bitwise was all you had), but there were lots of others. Declaration syntax was a problem, but Go partly fixed that one. Having fixed it, it's ridiculous not to fix others equally bad.
(
Log in to post comments)