One year of Go

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Nov 12 10:52:04 PST 2010


On 11/12/10 10:41 AM, Russel Winder wrote:
> On Fri, 2010-11-12 at 13:28 -0500, Sean Kelly wrote:
> [ . . . ]
>> What got me was "if you don't, there are situations that ... may give
>> the wrong result."  I'm fine with eliminating semicolons, but why is
>> this syntax allowed if it silently produces surprising results?  It
>> seems like a trivial change to require the proper syntax, and not
>> doing so makes me wonder if there are other such flaws as well.
>
> I understand.  I can't say I view the the situation with total
> happiness.  There are situations where the core Go development team
> stick to what can only be seen as blind prejudice.  It has to be said
> though that this is true of all language developments.
>
> I wonder if we need to leave the bike shed?

Is the example I just gave a bikeshed issue?

package main

import "fmt"

func blah() bool {
    return false
}

func main() {
   x := 5
   if(blah())
   {
     x++;
   }
   fmt.Printf("%d\n", x)
}

Again, to drive the point home: this program compiles flag free and runs 
printing 6.


Andrei


More information about the Digitalmars-d mailing list