FAQ
hi all,
        i'm new to golang. as far as i know, golang takes '{' place into
syntax check. but why not check '('? sorry about my poor english.



e.g.
package main

import
# no check no check
( "fmt"
"math"
)

func main() { #check
fmt.Printf("Now you have %g problems.", math.Sqrt(7))
}



--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Ian Lance Taylor at May 18, 2016 at 1:12 pm

    On Wed, May 18, 2016 at 4:58 AM, Eagle Qing wrote:
    hi all,
    i'm new to golang. as far as i know, golang takes '{' place into
    syntax check. but why not check '('? sorry about my poor english.
    It's a consequence of the implicit semicolon rule:
    https://golang.org/ref/spec#Semicolons .

    Mostly gofmt takes care of these things so you don't have to think about them.

    Ian

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 18, '16 at 12:26p
activeMay 18, '16 at 1:12p
posts2
users2
websitegolang.org

2 users in discussion

Ian Lance Taylor: 1 post Eagle Qing: 1 post

People

Translate

site design / logo © 2022 Grokbase