One year of Go

so so at so.do
Fri Nov 12 11:20:33 PST 2010


> Yah, the problem is they do different things. Try this:
>
> package main
> import "fmt"
> func blah() bool {
>     return false
> }
> func main() {
>    x := 5
>    if(blah()) {
>      x++;
>    }
>    fmt.Printf("%d\n", x)
> }
>
> (which prints 5) and then this:
>
> package main
> import "fmt"
> func blah() bool {
>     return false
> }
> func main() {
>    x := 5
>    if(blah())
>    {
>      x++;
>    }
>    fmt.Printf("%d\n", x)
> }
>
> (which prints 6). Looks like a major problem to me. Comparing this with  
> the meager advantage of eliminating semicolons, it seems that things  
> took a wrong turn somewhere.
>
>
> Andrei

If they have gone this far, why not pop an error and be done with it...

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/


More information about the Digitalmars-d mailing list