One document about Go

Lars T. Kyllingstad public at kyllingen.NOSPAMnet
Wed Jun 2 02:45:27 PDT 2010


On Wed, 02 Jun 2010 23:50:05 +0300, Alex Makhotin wrote:
> Just one excerpt from http://golang.org/doc/effective_go.html
>> One caveat. You should never put the opening brace of a control
>> structure (if, for, switch, or select) on the next line. If you do, a
>> semicolon will be inserted before the brace, which could cause unwanted
>> effects. Write them like this
>> 
>> if i < f() {
>>     g()
>> }
>> 
>> not like this
>> 
>> if i < f()  // wrong!
>> {           // wrong!
>>     g()
>> }

Words fail me.  That design is so horrible, at first I thought it was a 
joke.

-Lars


More information about the Digitalmars-d mailing list