One year of Go
Steven Schveighoffer
schveiguy at yahoo.com
Fri Nov 12 08:59:51 PST 2010
On Fri, 12 Nov 2010 11:29:15 -0500, Sean Kelly <sean at invisibleduck.org>
wrote:
> 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.
As discussed previously:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=110968
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D&article_id=110884
What they say is this:
if(x)
{
g(x)
}
is interpreted as this:
if(x);
{
g(x);
}
Absolutely, 100% wrong decision. Go will never recover from that IMO.
-Steve
More information about the Digitalmars-d
mailing list