One year of Go

Sean Kelly sean at invisibleduck.org
Fri Nov 12 08:29:15 PST 2010


I got about halfway through the Go tutorial and was stopped by this:

"You might have noticed that our program has no semicolons. In Go code, the only place you typically see semicolons is separating the clauses of for loops and the like; they are not necessary after every statement. . . This approach makes for clean-looking, semicolon-free code. The one surprise is that it's important to put the opening brace of a construct such as an if statement on the same line as the if; if you don't, there are situations that may not compile or may give the wrong result. The language forces the brace style to some extent."

To me, what they're saying is that their syntax is broken and so it forces a convention upon the users to deal with the issue.  I know this is just a bike shed issue, but seeing something like this in the beginning of the tutorial makes it difficult for me to take them seriously.


More information about the Digitalmars-d mailing list